if (interactive())
{
latticeStyleGUI()
}
## a base graphics plot (from example(matplot))
sines <- outer(1:20, 1:4, function(x, y) sin(x / 20 * pi * y))
matplot(sines, pch = 1:4, type = "o")
## apply Lattice settings and re-plot
opar <- latticeStyleToBasePar()
matplot(sines, pch = 1:4, type = "o")
## apply a different Lattice theme
trellis.par.set(custom.theme.black())
latticeStyleToBasePar()
plot(Ozone ~ Wind, data = airquality, col = 1)
## reset:
par(opar)
palette("default")
Run the code above in your browser using DataLab