Skip to content
Prev 69941 / 398506 Next

lattice plots question

Laura Holt wrote:
Hi, Laura,

See ?trellis.par.set or ?trellis.device. Lattice themes are what you are 
looking for.

e.g.

library(lattice)
trellis.device(windows, theme = col.whitebg())
xyplot(0 ~ 0)

You can also create your own themes, which I find extremely useful:

sundar.theme <- function() {
   par <- col.whitebg()
   par$strip.background$col <- rep("#000099", 7)
   par$add.text$col <- "#eeeeaa"
   par$add.text$font <- 2
   par$background$col <- "#ffffff"
   par$superpose.line$lty <- rep(1, 7)
   par$superpose.line$col[1:2] <- c("#880000", "#008800")
   par$superpose.symbol$col[1:2] <- c("#880000", "#008800")
   par
}

HTH,

--sundar