[R] multiple plots and postscript()
Chong Gu
chong at stat.purdue.edu
Thu Mar 6 23:56:29 CET 2003
You may try something like this:
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=.6)
The default spacings are different for 2x3 and 2x2. The layout
facility allows one to cheat it out.
Good luck.
Chong Gu
> Kia Ora everybody.
>
> There must be an obvious answer to this, but I can't see it....
>
> I want four square plots in one postscript file. The canonical answer
> would be:
>
> postscript(file="~/f.ps",width=5,height=5)
> par(pty="s",mfrow=c(2,2))
> plot(1:19,xlab="")
> plot(1:19,xlab="")
> plot(1:19,xlab="")
> plot(1:19,xlab="")
> dev.off()
>
> But this isn't quite what I want because there is too much space
> between the individual plots. The problem does not occur in quite the
> same way on the X11() device (why is there a difference?)
>
> What is the best way to control this aspect of the plot if I want
> postscript output?
>
>
>
>
>
>
>
> --
>
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list