[R] shading under the lines in a lattice xyplot?

From: Andy Bunn <abunn_at_whrc.org>
Date: Thu 16 Feb 2006 - 04:28:17 EST

In the lattice plot below I want to fill-in the areas under each lines that are greater than zero in gray. Is there a straightforward way to go about this? Thanks, Andy

foo <- data.frame(Yrs=rep(1:50,4), Y=rnorm(200),

xyplot(Y~Yrs|Id, data = foo,
       panel = function(x,y) {
          panel.lines(x,y, col = "black")

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 Feb 16 04:33:52 2006

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