[R] Multiple Legends on a densityplot

From: Ken Beath <kbeath_at_efs.mq.edu.au>
Date: Mon 17 Oct 2005 - 17:09:52 EST

I am trying to obtain multiple legends on a densityplot, using the legend parameter. I am trying the following code, with just one legend at the moment, which doesn't work. I get

Error in valid.data(rep(units, length.out = length(x)), data) :

     No 'grob' supplied for 'grobwidth' unit

Fixable or better method ? What I need is a separate legend for each panel.

densityplot(~lclassprob | cov,

     main='Density Plot for Covariates',
     xlab='Class probability (Logistic)',
     legend=list(inside=list(corner=c(0,0),x=0, y=0, fun=simpleKey,
         args=list(text= c("Yes","No"), points = FALSE,
           rectangles = FALSE,
           lines = TRUE))),

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 Mon Oct 17 17:16:56 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:58:40 EST