Learn R Programming

IntegratedJM (version 1.6)

multiplot: multiplot

Description

The multiplot function plots multiple ggplots in the same window.

Usage

multiplot(..., cols = 1)

Arguments

...

ggplot2 objects, separated by comma.

cols

Integer, specifying the number of plots in one row in the layout.

Value

Creates multiple ggplots in same window

Details

Plots multiple ggplots in the same window - multiplot(p1,p2,p3,p4, cols=2) is similar to the standard R notation par(mfrow=c(2,2)).

Examples

Run this code
# NOT RUN {
multiplot(p1,p2,p3,cols=3)
# }

Run the code above in your browser using DataLab