Set margins between plots using multiplot

后端 未结 3 635
粉色の甜心
粉色の甜心 2021-01-23 04:50

To display multiple plots I use multiplot (http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/), now I have two plots who share the same x-axis range and are

3条回答
  •  感动是毒
    2021-01-23 05:34

    The last update of ggplot2 gives much more control over the plot. See for example:

    ggplot(mtcars, aes(disp, mpg)) +
         geom_point() +
         facet_wrap(~vs)
    

    You can further adjust the labels, number of rows, and how scales will be displayed, for instance: nrow = 2; scales = "free".

提交回复
热议问题