R:{ggplot2}:我/我可以独立调整facet_grid图上的x轴限制吗? [英] R: {ggplot2}: How / Can I independently adjust the x-axis limits on a facet_grid plot?

查看:603
本文介绍了R:{ggplot2}:我/我可以独立调整facet_grid图上的x轴限制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了三个单变量密度的多面体 - 比较MCMC方法。下面显示





目前,我并不关心尾巴。那么我该如何改变上面的图上的x轴限制:

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

这是甚至可能吗?我已阅读这个线程从2009年,但它似乎并没有工作。是否实现了?

解决方案

您可以始终允许为每个方面独立设置限制,方法是指定

  + facet_wrap(...,scales =free_x)

还有免费和free_y选项。


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?

解决方案

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.

这篇关于R:{ggplot2}:我/我可以独立调整facet_grid图上的x轴限制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆