[R] Adding axis lines to splom plots

Sarah Barry sarah at stats.gla.ac.uk
Tue Oct 16 18:48:49 CEST 2007


I am trying to produce a 30x30 lattice grid.  The 30 variables naturally 
fall into three groups of ten and I would like to add thicker axis lines 
around these to highlight this.  However, I can only do this separately, 
so far, and I don't know how to superimpose the grid with the thicker 
lines (separating the 10x10 groups) onto the overall grid of all 30x30 
plots.  I enclose a reproducible example:

temp.df <- sapply(1:30, function(i) rnorm(20, 0,1))

splom(~temp.df, aspect="fill", varnames=paste("coord", 1:30, sep=""), 
xlab="", pscales=0, varname.cex=0.6, panel=function(x, y, ...){
   panel.xyplot(x,y, cex=0.2, xlab="", ylab="")

splom(~matrix(c(1,2,3), nc=3), aspect="fill", varnames=NULL, xlab="", 
pscales=0, axis.line.lwd=4, varname.cex=0.6, panel=function(x, y, ...){
   panel.xyplot(x,y, cex=0.2, xlab="", ylab="", type="n")

Many thanks in advance for any help.

Best regards,

Sarah Barry, MSc
Department of Statistics
University of Glasgow
Tel: +44 (0)141 330 2474
Fax: +44 (0)141 330 4814

More information about the R-help mailing list