Re: [R] lattice plots question

From: Martin Maechler <>
Date: Thu 19 May 2005 - 19:38:59 EST

>>>>> "Sundar" == Sundar Dorai-Raj <> >>>>> on Wed, 18 May 2005 14:23:35 -0500 writes:

    Sundar> Laura Holt wrote:
>> Dear R People:
>> Is there any way to have the background of lattice plots be white
>> instead of grey, please?
>> This is not a criticism by any means...the lattice stuff is UNbelievable!

indeed, it is!

>> ....

    Sundar> See ?trellis.par.set or ?trellis.device. Lattice     Sundar> themes are what you are looking for.

    Sundar> e.g.

    Sundar> library(lattice)
    Sundar> trellis.device(windows, theme = col.whitebg())
    Sundar> xyplot(0 ~ 0)

If, instead of line 2, you use

    trellis.device(theme = col.whitebg())

i.e., don't specify the device explicitly, you have solution that is portable {across platforms} : The device chosen will depend if you are in interactive or batch mode {which is good!} and in interactive mode will use 'windows', 'x11' , or 'quartz' depending on your platform --- as a matter of fact, it will be what you also get by getOption("device") and you can change by options(device = "myfavoriteDevice")                               

    Sundar> You can also create your own themes, which I find extremely useful:


    Sundar> sundar.theme <- function() {     Sundar> ..............

Martin Maechler, ETH Zurich mailing list PLEASE do read the posting guide! Received on Thu May 19 19:45:40 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:51 EST