[R] save plot

linda.s samrobertsmith at gmail.com
Tue Aug 3 23:36:16 CEST 2010


> [I presume you addressed this to Duncan Murdoch for a good reason???]
>
> Open a new device before plotting, do your plotting, close the device.
>
> For example, using a PDF device via pdf():
>
> pdf("my_plots.pdf", height = 8, width = 8, pointsize = 10,
>    version = "1.4", onefile = TRUE)
> for(i in 1:10) {
>    y <- rnorm(100)
>    x <- rnorm(100)
>    plot(y ~ x)
> }
> dev.off()

Can I make a group of jpg instead of pdfs?
Thanks.
Linda



More information about the R-help mailing list