[R] layout function for several plots

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Sep 19 22:12:42 CEST 2007


On Wed, 19 Sep 2007, Greg Snow wrote:

> Using ann=F just tells R not to put anything in the margins, it does not 
> reduce the size of the margins.  You need to reduce the margin size 
> using par(mar= ...) with appropriate values.  You can then shrink what 
> goes in the margins rather than not plotting it at all (though that is a 
> good first step to make sure everything else works).

However, if you try to plot 9 plots on one device surface, you almost 
certainly need to reduce the pointsize.  par(mfrow=) does that 
automatically, but layout() does not.  If the device you are using does 
not support pointsize, try a global setting of cex.  You could also 
increase the device dimensions, but other settings (e.g. the default line 
width) will not be appropriate unless the intention is to zoom in on 
individual plots.
a

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list