[R] ways to put multiple graphs on single page (using ggplot2)

Juliet Hannah juliet.hannah at gmail.com
Mon Mar 2 19:35:24 CET 2009


Hi, Here are three plots:

library(ggplot2)
data(diamonds)
randind <- sample(nrow(diamonds),1000,replace=FALSE)
dsmall <- diamonds[randind,]

qplot(carat, data=dsmall, geom="histogram",binwidth=1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.01)

What are ways to put these three plots on a single page and label them
A, B, and C.

In general, do you use R directly for these tasks, or do you use an
image editor? If you use an editor, which one do you use?
I'm working on Windows. Thanks for your time.

Regards,

Juliet




More information about the R-help mailing list