Hi, is there a grayscale setting for lattice plots? I like the default color settings. I also like the settings that are available for setting black and white with something like this: --8<---------------cut here---------------start------------->8--- 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 --8<---------------cut here---------------end--------------->8--- Is there a simple way of achieving something in between these settings (using grayscales for the default colors)? Thankful for any pointers, Patrick
Patrick Drechsler <patrick at pdrechsler.de> writes:> is there a grayscale setting for lattice plots?Solved using ## Set background color of strips to grayscales: strip.background <- trellis.par.get("strip.background") trellis.par.set(strip.background = list(col = grey(7:1/8))) ## Set color of plot symbols to grayscale: plot.symbol <- trellis.par.get("plot.symbol") trellis.par.set(plot.symbol = list(col = grey(5/8))) Patrick
On 7/28/07, Patrick Drechsler <patrick at pdrechsler.de> wrote:> Hi, > > is there a grayscale setting for lattice plots? > > I like the default color settings. I also like the settings that are > available for setting black and white with something like this: > > --8<---------------cut here---------------start------------->8--- > 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 > --8<---------------cut here---------------end--------------->8--- > > Is there a simple way of achieving something in between these settings > (using grayscales for the default colors)?Possibly, but you would have to define what you mean by 'simple' and 'something in between' more precisely. help(trellis.par.set) tells you how to change settings, and you can use it to change all the components you want (and the colors can of course be greyscale). -Deepayan