Re: [R] lattice plots question

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Thu 19 May 2005 - 05:23:35 EST

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!
>
> Thanks,
> Laura Holt
> mailto: lauraholt_983@hotmail.com
>
> R Version 2.1.0 Windows
>

Hi, Laura,

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

e.g.

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

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

sundar.theme <- function() {

   par <- col.whitebg()

   par$strip.background$col <- rep("#000099", 7)
   par$add.text$col <- "#eeeeaa"
   par$add.text$font <- 2
   par$background$col <- "#ffffff"
   par$superpose.line$lty <- rep(1, 7)
   par$superpose.line$col[1:2] <- c("#880000", "#008800")
   par$superpose.symbol$col[1:2] <- c("#880000", "#008800")
   par
}

HTH, --sundar



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 19 05:27:42 2005

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