[R] Black and white graphics and transparent strip panels with lattice under Sweave

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Jan 3 03:23:11 CET 2005


Deepayan Sarkar wrote:
> 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
> 

That worked perfectly.  Thank you very much Deepayan.  -Frank




More information about the R-help mailing list