View source: R/combine_plots.R
combine_plots | R Documentation |
Sometimes we want to put several (ggplot) plots together in one figure for
publication. combine_plots
does exactly that, allowing additional
parameters to control the alignment and index labels of the individual plots,
and etc.
combine_plots( ..., align = "v", ncol = 2, labels = "auto", label_size = 10, title = "Grand Title", title_size = 12 )
... |
Several ggplot objects. Pass in no more than 6 to avoid crowdness. |
align |
Specifies whether the plots should be horizontally ("h") or vertically ("v") aligned. Options are "none", "h", "v" (default), and "hv" (align in both directions). |
ncol |
Number of columns in the plot grid. Default = 2. |
labels |
List of labels to be added to the plots. You can also set
|
A ggplot object that shows multiple graphs in one figure.
inst/examples/ex-combine_plots.R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.