multiplot: multiplot()

Description Usage Arguments Value Note

View source: R/multiplot.R

Description

plot multiple ggplots in one plot Multiple plot function # from http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/

Usage

1
2
multiplot(..., plotlist = NULL, cols = 1, layout = NULL, order = T,
  sequence = NULL)

Arguments

...

a list of ggplot objects, e.g. p1, p2

plotlist

a list of ggplot objects, e.g. list(p1, p2)

cols

(integer) specify how many columns in the output plot

layout

A matrix specifying the layout. If present, 'cols' is ignored. e.g matrix(c(1,2,3,4), nrow=2, byrow=TRUE)

order

(bool) default T if T, the order is from top to bottom, then left to right if F, the order is from left to right then top to bottom

Value

a plot with all the input plots

Note

If the layout is something like matrix(c(1,2,3,4), nrow=2, byrow=TRUE), then plot 1 will go in the upper left, 2 will go in the upper right, and 3 will go all the way across the bottom.The same plot can be repeated


BerylZhuang/helper_functions documentation built on March 15, 2021, 5:19 a.m.