multiplot: Displaying multiple ggplot2 objects.

Description Usage Arguments Value

Description

The function plots multiple ggplot2 object sin a single page. Original code was provided by R Graphics Cookbook, Practical Recipes for Visualizing Data by Winston Chang, Publisher: O'Reilly Media, Release Date: December 2012, Pages: 416. http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/

Usage

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

Arguments

...

ggplot objects to be plotted. If plotlist is provided, the argument is ignored.

plotlist

List of ggplot objects to be plotted. If ... is provided, the argument is ignored. Default is NULL.

file

File path for the plot.

cols

Number of columns in the layout. Defaul is 1.

layout

A matrix specifying the layout. If present, cols is ignored. For example matrix(c(1, 2, 3, 3), nrow = 2, byrow = TRUE) will produce one plot in the upper left, two plots in the upper right and three will go all the way across the bottom. Default is NULL.

Value

The function makes a plot with multiple ggplot objects in a single page.


andreabz/pbratios documentation built on May 12, 2019, 2:42 a.m.