Skip to content
Prev 198732 / 398506 Next

How to properly shade the background panels of an xyplot?

On Fri, Oct 30, 2009 at 8:33 PM, Ottorino-Luca Pantani
<ottorino-luca.pantani at unifi.it> wrote:
See ?which.packet, which will tell you the current levels of the
conditioning variables. So something like

      panel = function(x, y, subscripts, aux.env, ...) {
          wp <- which.packet()
          if (levels(Oats$Variety)[wp[1]] %in% c("Victory",
"Marvellous") || ...)
              panel.fill(col = gray(metric))
         panel.lines(x,y)
     })

-Deepayan