An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090312/ec949bd2/attachment-0002.pl>
eps/pdf write help
2 messages · Mohan Singh, Philipp Pagel
On Thu, Mar 12, 2009 at 03:06:30PM +0000, Mohan Singh wrote:
I am trying to print graphs as pdf's or eps in a for loop, but I can't seem to get it right Either it prints only a single eps graph (overwrites) or when I use #pdf(paste(i,".pdf", sep="")) .. it prints all pdf's but they are empty
Did you remember to close the pdf files? Something like the following
should work:
x <- seq(0, 10, 0.01)
for (i in 1:5) {
pdf(paste('plot', i, '.pdf', sep=''))
plot(x, x^i)
dev.off()
}
cu
Philipp
Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://mips.gsf.de/staff/pagel