Skip to content
Prev 31620 / 398506 Next

xyplot (lattice), strip.default

Wladimir Eremeev wrote:
Look at ?strip.default and try style = 4, or style = 5:

fooData <- data.frame(
     year = factor(rep(2001:2010, each = 20)),
     y = rnorm(200),
     x = rep(1:20, time = 10))

library(lattice)

trellis.device(bg = "white")
xyplot(y ~  x | year, data = fooData,
        type = "l",
        layout = c(1, 10),
        xlab = "Longitude",
        as.table = TRUE,
        strip = function(...) strip.default(style = 5,...)
        )
Look at ?trellis.device:

trellis.device(bg = "white",
                device = "png",
                filename = "d:/analyses/fig1.png")
xyplot(y ~  x | year, data = fooData,
        type = "l",
        layout = c(1, 10),
        xlab = "Longitude",
        as.table = TRUE,
        strip = function(...) strip.default(style = 5,...)
        )
dev.off()

Best,

Renaud