[R] Black and white graphics and transparent strip panels with lattice under Sweave
Deepayan Sarkar
deepayan at stat.wisc.edu
Mon Jan 3 03:11:54 CET 2005
On Sunday 02 January 2005 19:40, Frank E Harrell Jr wrote:
> What is the most elegant way to specify that strip panels are to have
> transparent backgrounds and graphs are to be in black and white when
> lattice is being used with Sweave? I would prefer a global option
> that stays in effect for multiple plots.
>
> If this is best done with a theme, does anyone have a lattice theme
> like col.whitebg but that is for black and white?
I'd do something like this as part of the initialization:
<<...>>
library(lattice)
ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme
ltheme$strip.background$col <- "transparent" ## change strip bg
lattice.options(default.theme = ltheme) ## set as default
@
Deepayan
More information about the R-help
mailing list