[R] Separate x-axis ticks for panels in xyplot()?

Richard M. Heiberger rmh at temple.edu
Wed May 9 04:10:22 CEST 2007


This will get you started.

Rich




tmp <- data.frame(y=rnorm(20), x=rnorm(20),
                  c=factor(rep(letters[1:5], 4)),
                  g=factor(rep(1:2, each=10)))
v1 <- seq(-1.5, 0, .5)
v2 <- 0:2


xyplot(y ~ x | c, groups = g, data=tmp,
       scales = list(x = list(
                       relation="sliced",
                       at = rep(list(v1, v2), length=5),
                       labels = rep(list(
                         c('A', 'B', 'C', 'D'),
                         c('E', 'F', 'G')), length=5),
                       rot = 45)))



More information about the R-help mailing list