Skip to content

PDF output problem

2 messages · Andre Rabello DOS ANJOS, Thomas Lumley

#
Hello,
	I'm quite new to R, but I've already stepped into this problem:
I open a PDF device with:
pdf("Name-%d.pdf", width=10, height=10, onefile=FALSE)

And draw 4 histograms in a row, expecting the pdf device to
automatically number them from 1 to 4. What I get back is
only 2 images with names "Name-1.pdf" and "Name-2.pdf" that
contain the two last histograms I've plotted. Is it a known
problem? Or am I doing something wrong here?

I attach the script to this message in the hope somebody knows
the cause of this strange behaviour. Thanks in advance for
any help.

	Andre.
#
Still present in r-devel, eg

pdf("name%d.pdf",onefile=FALSE)
plot(1,main=1)
plot(1,main=2)
plot(1,main=3)
plot(1,main=4)
dev.off()

produces two files "name1.pdf" and "name2.pdf" containing the first and
fourth plots respectively. Doesn't happen with postscript().

	-thomas




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._