Frank E Harrell Jr
2005-Jan-03 01:40 UTC
[R] Black and white graphics and transparent strip panels with lattice under Sweave
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'm using the following with lattice 0.10-16, grid 2.0.0: platform i586-mandrake-linux-gnu arch i586 os linux-gnu system i586, linux-gnu status major 2 minor 0.0 year 2004 month 10 day 04 language R Thanks, Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Deepayan Sarkar
2005-Jan-03 02:11 UTC
[R] Black and white graphics and transparent strip panels with lattice under Sweave
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