Description Usage Arguments Value Author(s) References Examples
Put multiple graphs on the same page.
1 | ggplot2.multiplot(..., plotlist = NULL, cols = 2)
|
plotlist |
a list of plots |
cols |
Number of columns in layout |
... |
List of ggplot2 objects separated by a comma. (e.g: plot1, plot2, plot3) |
a ggplot
Alboukadel Kassambara <alboukadel.kassambara@gmail.com>
http://www.sthda.com
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.