Message-ID: <BA652F3D-6764-4D0A-B0D5-A95B378AC138@efs.mq.edu.au>
Date: 2005-10-17T07:09:52Z
From: Ken Beath
Subject: Multiple Legends on a densityplot
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,
groups=group,
main='Density Plot for Covariates',
xlab='Class probability (Logistic)',
plot.points=FALSE,
layout=c(1,6),
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))),
data=newcapsCov2)