[R] overwritten plots in pdf file

2009-09-29 Thread CJ Rubio
i am having a problem in saving plots in pdf. i have this code below and it only shows me the last plot. i tried keeping my devices open by removing dev.off() from the code but the pdf file won't open for (i in 1:n) { . . . pdf(D:/research/plot.pdf) plot(mon, mu, type ='o') dev.off() } my for

Re: [R] overwritten plots in pdf file

2009-09-29 Thread baptiste auguie
Hi, Try opening and closing the device outside the loop, pdf(D:/research/plot.pdf) for (i in 1:n) { plot(mon, mu, type ='o') } dev.off() HTH, baptiste __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do