[R] multiple plots and postscript()
Robin Hankin
r.hankin at auckland.ac.nz
Wed Mar 12 01:24:39 CET 2003
Many thanks to everyone who helped me with resizing my subplots.
The problem was that setting par(mfrow=c(2,2)) does not rescale the
fonts, which are set to be the right size for A4 paper. What I didn't
realize was that resizing the fonts also resizes the positions of axis
labels and titles, making the plots look much better. par(mar) can
also be changed from its default (A4) values.
To my eye, the optimum plots resulted from:
postscript(file="fig.ps",height=4,width=4)
layout(matrix(c(0,1,2,0,3,4),2,3,byrow=TRUE),c(0,1,1),c(1,1))
par(mar=c(5,5,2,2)+.1,mex=0.5)
plot(1:10);plot(1:10);plot(1:10);plot(1:10)
dev.off()
Could this example (or one like it) be added to the docs for par() ?
[there is something similar---but more complicated---in ?layout].
--
Robin Hankin, Lecturer,
School of Geography and Environmental Science
Tamaki Campus
Private Bag 92019 Auckland
New Zealand
r.hankin at auckland.ac.nz
tel 0064-9-373-7599 x6820; FAX 0064-9-373-7042
More information about the R-help
mailing list