multiplot: Create multi-panel plot from individual plots.

Description Usage Arguments Value Source See Also Examples

Description

A simplistic way to create multi-panel ggplot figures when facet won't work.

Usage

1
multiplot(..., plotlist = NULL, cols = 1, layout = NULL)

Arguments

...

One or more plot objects to be plotted

plotlist

A list of plots, if not passed as ...

cols

Number of columns the multi-panel plot will have.

layout

An option matrix describing the layout of the multi-panel plot.

Value

A multi-panel plot composed of the input plots.

Source

http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/

See Also

The gtable package https://github.com/hadley/gtable has much more advanced multiplot layout capabilities, but is more complex.

Examples

1
2
3
# plot_a <- qplot(data = dat, geom = "hist")
# plot_b <- qplot(data = dat2, x = V1, y = V2, geom = "jitter")
# multiplot(plot_a, plot_b, cols = 2)

Defenders-ESC/threatdemog documentation built on May 6, 2019, 1:58 p.m.