Hello, I have a (hopefully) quick question concerning the xyplot function. The xyplot works very fine for me - I am using it to display functions of two variates depending on several other factors. I am therefor also using the groups argument, so that the symbols in each panel appear in different colors. Now I would like to change how the different groups are displayed - now they are circles in different colors, and I would like to change those colors. Can you tell me how to do this? my complete xyplot command right now looks like this: xyplot(a ~ b| t*h, groups=r, xlab="Zyklen", ylab="Riss [%]", auto.key=list(lab=levels(r),columns=3)) Thank you very much, Antje
Antje Steller wrote:> > Hello, > Now I would like to change how the different groups are displayed - now > they are circles in different colors, and I would like to change those > colors. > > .. > my complete xyplot command right now looks like this: > > xyplot(a ~ b| t*h, groups=r, xlab="Zyklen", ylab="Riss [%]", > auto.key=list(lab=levels(r),columns=3)) > >My preferred method is to change the colors globally to enforce consistency. sup = trellis.par.get("superpose.symbol") sub # make changes to sup$col and possible to sup$fill and sub$pch trellis.par.set("superpose.symbol",sub) show.settings() # Do your plotting I you want better answer, prepare an example with dummy data. The call to xyplot you showed is not "complete". Dieter -- View this message in context: http://n4.nabble.com/Changing-style-for-groups-in-xyplot-tp1567655p1567882.html Sent from the R help mailing list archive at Nabble.com.