Dear R list,

The code below puts qq-plots for two of three groups on the one plot. However the legend includes all three groups, ie the auto.key ignores the subset instruction. Is there an easy way to get around this, so that only those groups plotted are included in the legend?

y1<-rnorm(100); y2<-rnorm(100)+1; y3<-rnorm(100)+2; y<-c(y1,y2,y3)
fact=factor(c(rep(1,100),rep(2,100),rep(3,100)))
require(lattice)
qqmath(~y,groups=fact,auto.key=list(corner=c(0,1)),subset=fact!=2)

Many thanks,
John Field


=========================
John Field Consulting Pty Ltd
10 High Street, Burnside SA 5066 Australia
Phone 08 8332 5294 or 0409 097 586
Fax   08 8332 1229
Email  johnfi...@ozemail.com.au 

Checked by AVG - www.avg.com

:33:00
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to