如何控制ggplot2中具有不同比例的小平面图的ylim? [英] How to control ylim for a faceted plot with different scales in ggplot2?

查看:324
本文介绍了如何控制ggplot2中具有不同比例的小平面图的ylim?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的例子中,我该如何为每个方面设置单独的ylims?

  qplot(x,value, data = df,geom = c(smooth))+ facet_grid(variable〜。,scale =free_y)

在每个方面,y轴取值范围不同,我希望每个方面都有不同的ylims。



默认情况下ylims对于我想看到的趋势来说太长了。

不久前在ggplot2邮件列表上提出。你所要求的是目前不可能的,但我认为它正在进行中。


In the following example, how do I set separate ylims for each of my facets?

qplot(x, value,  data=df, geom=c("smooth")) + facet_grid(variable ~ ., scale="free_y")

In each of the facets, the y-axis takes a different range of values and I would like to different ylims for each of the facets.

The defaults ylims are too long for the trend that I want to see.

解决方案

This was brought up on the ggplot2 mailing list a short while ago. What you are asking for is currently not possible but I think it is in progress.

这篇关于如何控制ggplot2中具有不同比例的小平面图的ylim?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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