Exporting for print

To export ggplot graphics you can use the ggsave() function:


ggplot(mtcars, aes(wt, mpg)) + geom_point()
ggsave(filename = "myplot.pdf")

See the ggplot docs on exporting or page 323 of the R Graphics Cookbook for lots more detail.