Marius Hofert
2011-Jan-04 10:57 UTC
[R] lattice: par.settings with standard.theme() + additional arguments?
Dear expeRts, I usually use par.settings = standard.theme(color = FALSE) to create lattice graphics without colors, so something like library(lattice) x <- runif(10) xyplot(x ~ 1:10, type = "l", par.settings = standard.theme(color = FALSE)) Now I would like to use an additional component in par.settings. I tried several things like xyplot(x ~ 1:10, type = "l", par.settings = c(standard.theme(color = FALSE), list(par.xlab.text = list(cex = 5, col = "blue")))) but it doesn't work. I know I could use lattice.options() but is there a way to get it right ("locally") with par.settings? Cheers, Marius
David Winsemius
2011-Jan-04 13:32 UTC
[R] lattice: par.settings with standard.theme() + additional arguments?
On Jan 4, 2011, at 5:57 AM, Marius Hofert wrote:> Dear expeRts, > > I usually use par.settings = standard.theme(color = FALSE) to create > lattice graphics > without colors, so something like > > library(lattice) > x <- runif(10) > xyplot(x ~ 1:10, type = "l", par.settings = standard.theme(color = > FALSE)) > > Now I would like to use an additional component in par.settings. I > tried several things > like > > xyplot(x ~ 1:10, type = "l", par.settings = c(standard.theme(color = > FALSE), list(par.xlab.text = list(cex = 5, col = "blue")))) > > but it doesn't work. I know I could use lattice.options() but is > there a way to get it > right ("locally") with par.settings?Add it as a list element: xyplot(x ~ 1:10, type = "l", par.settings = list(standard.theme(color = FALSE), par.xlab.text = list(cex = 5, col = "blue"))) -- David Winsemius, MD West Hartford, CT
Seemingly Similar Threads
- lattice: strange behavior (?) when using trellis.device(color=FALSE)
- splom, plotmath: how to add three lines of information with alignment?
- lattice + plotmath: how to get a variable in bold face?
- Alignment and Labeling of a color key in a xyplot?
- how to print a colored plot in black/white?