ggplot2.multiplot: Put multiple graphs on the same page.

Description Usage Arguments Value Author(s) References Examples

View source: R/ggplot2.multiplot.R

Description

Put multiple graphs on the same page.

Usage

1
ggplot2.multiplot(..., plotlist = NULL, cols = 2)

Arguments

plotlist

a list of plots

cols

Number of columns in layout

...

List of ggplot2 objects separated by a comma. (e.g: plot1, plot2, plot3)

Value

a ggplot

Author(s)

Alboukadel Kassambara <alboukadel.kassambara@gmail.com>

References

http://www.sthda.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#data.frame
df <- ToothGrowth
#Custom boxplot with centered dot plot
plot1<-ggplot2.boxplot(data=df, xName='dose',yName='len', groupName='dose',
                addDot=TRUE, dotSize=1)

#Custom dotplot with centered dot plot
plot2<-ggplot2.dotplot(data=df, xName='dose',yName='len', groupName='dose')

#Custom stripchart with centered dot plot
plot3<-ggplot2.stripchart(data=df, xName='dose',yName='len', groupName='dose')

#Notched boxplot
plot4<-ggplot2.boxplot(data=df, xName='dose',yName='len',
                notch=TRUE)

#Multple graphs on the same page
ggplot2.multiplot(plot1,plot2,plot3,plot4, cols=2)

kassambara/easyGgplot2 documentation built on May 20, 2019, 7:39 a.m.