opar <- trellis.par.get()
trellis.par.set(custom.theme.2())
latticeStyleDemo()
trellis.par.set(custom.theme.black())
latticeStyleDemo()
## make changes to the theme
myTheme <- modifyList(custom.theme.black(),
simpleTheme(alpha.points = 0.1))
myTheme$add.line$lty <- 3
## now apply myTheme, or just:
trellis.par.set(simpleTheme(alpha.points = 0.1))
trellis.par.set(add.line = list(lty = 3))
latticeStyleDemo()
trellis.par.set(opar)
Run the code above in your browser using DataLab