On Fri, 25 Aug 2006 17:51:24 +0200, Stefan Grosse <[EMAIL PROTECTED]> wrote:
> Dear List, I try to make a xyplot with different colors and symbols, I > came this far: > library(DAAG) > xyplot(csoa~it|sex*agegp,data=tinting,groups=target,pch=list(1,2),auto.key=list(space > = "right")) > this produces a plot with different colors and symbols but unfortunately > the legend does only follow the color scheme and not the different > symbols. > Any suggestions what to change? I think that 'pch' is passed only to the panel function, and the key uses whatever the current trellis.par.set() is, if you don't define it explicitly (all explained in ?xyplot). I find it easier to call trellis.par.set before the xyplot: R> trellis.par.set(superpose.symbol=list(pch=c(1, 2))) Warning message: Note: The default device has been opened to honour attempt to modify trellis settings in: trellis.par.set(superpose.symbol = list(pch = c(1, 2))) R> xyplot(csoa~it|sex*agegp,data=tinting,groups=target,auto.key=list(space="right")) Cheers, -- Seb ______________________________________________ [email protected] 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.
