R: {ggplot2}: How / Can I independently adjust the x-axis limits on a facet_grid plot?

谁说我不能喝 提交于 2020-01-02 04:27:05

问题


I created a faceted set of three univariate densities -- comparing MCMC methods. Shown below

For the moment, I don't care about the tails. So how can I change the x-axis limits on the plots above to be:

c(-3,1)
c(-2,0)
c(-10, -8)

Is this even possible? I've already read this thread from 2009, but it doesn't seem to work. Was this implemented?


回答1:


You can always allow limits to be set independently for each facet by specifying

+ facet_wrap(...,scales = "free_x")

There are also "free" and "free_y" options.



来源:https://stackoverflow.com/questions/6574188/r-ggplot2-how-can-i-independently-adjust-the-x-axis-limits-on-a-facet-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!