- show.settings is very useful for seeing the current
settings and the effect of changes.
- You can save the current theme with
current.theme <- trellis.par.get()
- standard.theme produces the old default with gray
backgrounds and the like.
- canonical.theme(color=FALSE) produced the black and
white theme used for the Lattice book.
- You can change the theme for the current device with
trellis.device(theme = newtheme, new = FALSE)
- The theme can be set for an entire session by adding something
this to .First():
lattice.options(lattice.theme = newtheme)
- The theme for a single high level lattice call can be set using
the par.settings argument:
dotplot(variety ~ yield | site, barley,
layout = c(1, 6), aspect = c(0.7),
groups = year, auto.key = list(space = 'right'),
par.settings = canonical.theme(color=FALSE))
- The simpleTheme function is useful for minor theme
modifications:
dotplot(variety ~ yield | site, barley,
layout = c(1, 6), aspect = c(0.7),
groups = year, auto.key = list(space = 'right'),
par.settings = simpleTheme(pch=16))