[R] pdf and postscript sizes - change on each page?

Alex Brown alex at transitive.com
Wed Sep 27 14:38:36 CEST 2006


Hi All

The device commands pdf and postscript allow you to specify the width  
and height of a page.  However, each subsequent plot is drawn on a  
separate page.  Is there a way to change the page size part way through?

For instance, is there an equivalent to the function pdfresize below?

pdf("/tmp/1.pdf", width=6, height=6)

plot(1:10)

pdf.resize(width=8, height=5)

plot(sin, -pi, pi)

dev.off()

---

So far, the only way I can find to do this is:

pdf("/tmp/1.pdf", width=6, height=6)

plot(1:10)

dev.off()

pdf("/tmp/1.pdf", width=8, height=5)

plot(sin, -pi, pi)

dev.off()

---

however, this creates a new file - it does not append to the existing  
file.

I would note that the quartz device has some resize capability, when  
you drag the window frame.

-Alex



More information about the R-help mailing list