[R] lattice grayscale "theme"
patrick at pdrechsler.de
Tue Jul 31 03:15:55 CEST 2007
"Deepayan Sarkar" <deepayan.sarkar at gmail.com> writes:
> On 7/30/07, Patrick Drechsler <patrick at pdrechsler.de> wrote:
>> The Gmane interface seems to have some lag at the moment...
>> "Deepayan Sarkar" <deepayan.sarkar at gmail.com> writes:
>> > On 7/28/07, Patrick Drechsler <patrick at pdrechsler.de> wrote:
>> >> is there a grayscale setting for lattice plots?
>> >> 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.
>> Here is an example of 'in between':
>> --8<---------------cut here---------------start------------->8---
>> ## 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)))
>> --8<---------------cut here---------------end--------------->8---
> Well, there you go. You have a new theme.
Thanks for confirming that I am on the right track!
>> I think it would be nice to have a few default "themes": A single
>> switch between "default color", "grayscale" and "black and white".
> I'm still not sure what qualities you are looking for in the new
Lattice should have good default settings for color, grayscale and
The user should not be bothered with the details (similar to using
LaTeX: Many users do not have any idea of DEK's typesetting in the
Lattice functions should provide reasonable default settings.
The default colors for the lattice suite were chosen for a reason
(very good choice for color display).
IMO the default grayscale colors should be wrapped into a similar
default-suite after discussion of which grayscales are best suited for
printing with different common resolutions using b/w printers.
After this has been decided upon, it might be nice to have something
along the lines of:
lattice.options(default.theme = [color|gray|bw])
Have I described my concern elaborately enough?
> An upcoming version of the latticeExtra package will have a function
> that can be used to create a theme based on some given colors; you
> might find it useful. It uses colors from RColorBrewer by default,
> and looks like:
This looks very interesting, thanks for keeping the development going!
More information about the R-help