[R] R graphics

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu Jul 21 15:46:21 CEST 2005



Sam Baxter wrote:
> Hi
> 
> I am trying to set up 16 graphs on one graphics page in R. I have used 
> the mfrow=c(4,4) command. However I get a lot of white space between 
> each graph. Does anyone know how I can reduce this?
> 
> Thanks
> 
> Sam
> 

Two options:

1. play around with the `mar' parameter in ?par.

2. (Preferred) Use the lattice package. See, for example:

library(lattice)
trellis.device(theme = col.whitebg())
z <- expand.grid(x = 1:10, y = 1:10, g = LETTERS[1:16])
xyplot(y ~ x | g, z)


HTH,

--sundar




More information about the R-help mailing list