I have a grouping variable C<-c(1,2,3) which gives me the plot symbols in a xyplot (lattice library) in three different colors, according the group variable.
xyplot(A ~ B), group=factor(C))
if I now apply the panel.xyplot / panel.loess all the colors are changing back to red.
xyplot(A ~ B), group=factor(C)),
panel = function(x, y) {
panel.grid(h=-1, v= 2)
panel.xyplot(x, y)
panel.loess(x,y, span=1)
},
aspect = "xy")I'm wondering if anyone knows a easy way how I could retain the colors of the plot symbols according to the grouping variable.
Yours Frank -- Frank Mattes, MD e-mail: [EMAIL PROTECTED] Department of Virology fax 0044(0)207 8302854 Royal Free Hospital and tel 0044(0)207 8302997 University College Medical School London
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
