[R] Lattice: useOuterStrips and axes

Jim Price price_ja at hotmail.com
Tue Mar 1 19:29:57 CET 2011


Consider the following:


library(lattice)
library(latticeExtra)

temp <- expand.grid(
		    subject = factor(paste('Subject', 1:3)),
		    var = factor(paste('Variable', 1:3)),
		    time = 1:10
		    )
temp$resp <- rnorm(nrow(temp), 10 * as.numeric(temp$var), 1)

ylimits <- by(temp$resp, temp$var, function(x) range(pretty(x)))

useOuterStrips(xyplot(
		      resp ~ time | subject * var,
		      data = temp,
		      as.table = TRUE,
		      scales = list(
				    alternating = 1, tck = c(1, 0),
				    y = list(relation = 'free', rot = 0, limits = rep(ylimits, each =
3))
				    )
		      ))


This is a matrix of variables on subjects, where it makes sense to have
panel-specific y-axes because of the differing variable ranges. In fact, it
makes sense to have row-specific y-axes, because of the similarity of
intra-variable inter-subject response. However the graphic as presented
gives per-panel y-axis annotation - I'd like to drop the 2nd and 3rd columns
of y-axes labels, so the panels become a contiguous array.

Is this possible?

Thanks,
Jim Price.
Cardiome Pharma. Corp.



-- 
View this message in context: http://r.789695.n4.nabble.com/Lattice-useOuterStrips-and-axes-tp3330338p3330338.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list