【问题标题】:Separate y axis for different facets in ggplotggplot中不同方面的单独y轴
【发布时间】:2013-12-03 16:05:29
【问题描述】:

我想使用 ggplot 创建一个绘图,其中不同的方面应该有不同的 y 轴限制。默认情况下,每个方面都具有相同的 y 轴值。这可以以某种方式改变吗?

【问题讨论】:

  • scales 方面的参数

标签: r ggplot2


【解决方案1】:

您可以将scales 改为“free_y”。

  facet_grid(facets, margins = FALSE, scales = "fixed",
    space = "fixed", shrink = TRUE,
    labeller = "label_value", as.table = TRUE, drop = TRUE)

更多详细信息和示例,请参阅:http://docs.ggplot2.org/0.9.3.1/facet_grid.html

【讨论】:

    【解决方案2】:

    ?facet_grid。您想使用参数scales="free_y"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-05
      • 1970-01-01
      相关资源
      最近更新 更多