Separate y axis for different facets in ggplot

后端 未结 2 1605
半阙折子戏
半阙折子戏 2021-01-17 09:37

I would like to create a plot using ggplot where different facets should have different y axis limits. By default each facet has the same y axis values. can this be changed

相关标签:
2条回答
  • 2021-01-17 10:22

    See ?facet_grid. You want to use the argument scales="free_y".

    0 讨论(0)
  • 2021-01-17 10:33

    You can change scales to "free_y" instead.

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

    For further detail and examples, see: http://docs.ggplot2.org/0.9.3.1/facet_grid.html

    0 讨论(0)
提交回复
热议问题