[R] multiframe in postscript
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Sun Dec 17 19:08:45 CET 2000
On Sun, 17 Dec 2000, Chong Gu wrote:
>
> I was hoping that the following specification
>
> postscript(file="fig.ps",height=2,width=4)
> par(mar=c(5,5,2,2)+.1,mfrow=c(1,2),mex=.6)
>
> would yield the same scaling effect as
>
> postscript(file="fig.ps",height=2,width=6)
> par(mar=c(5,5,2,2)+.1,mfrow=c(1,3),mex=.6)
>
> but the fact is that the 'mfrow=c(1,2)' yields smaller plotting frame
> and bigger font size. Some experiments show that the device scales
> differently for two or less rows (columns) and three or more rows
> (columns).
>
> Is this a feature or "bug"?
>
> I am running R-1.2, but I doubt the version matters here.
It is a feature, copied from S. It is only the font scaling (and
everything that depends on it) which depends on the mfrow/col layout.
Here's the C code exerpt (in par.c):
if (nrow > 2 || ncol > 2) {
dd->gp.cexbase = dd->dp.cexbase = 0.66;
dd->gp.mex = dd->dp.mex = 1.0;
}
else if (nrow == 2 && ncol == 2) {
dd->gp.cexbase = dd->dp.cexbase = 0.83;
dd->gp.mex = dd->dp.mex = 1.0;
}
else {
dd->gp.cexbase = dd->dp.cexbase = 1.0;
dd->gp.mex = dd->dp.mex = 1.0;
}
So you want to set cex=0.66 in the first case, I think. (The details
are not quite the same as S, as far as I recall.)
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list