[R] change lattice panel background color

Deepayan Sarkar deepayan.sarkar at gmail.com
Sat Jan 14 18:43:43 CET 2006


On 1/13/06, Waichler, Scott R <Scott.Waichler at pnl.gov> wrote:
>
> I can't find a way to change just the panel background color in lattice.
> I would like NA regions in levelplot() to appear black.  I've tried the
> trellis.par.set() stuff, but it it makes the background of the whole
> graphic black.

Use panel.fill in a panel function, e.g. (untested)

panel = function(...) {
    panel.fill(col = "black")
    panel.levelplot(...)
}

-Deepayan




More information about the R-help mailing list