[R] losing color in panal.xyplot (lattice)
Frank Mattes
f.mattes at ucl.ac.uk
Fri Jun 6 21:10:00 CEST 2003
Dear R help-list reader,
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: f.mattes at ucl.ac.uk
Department of Virology fax 0044(0)207 8302854
Royal Free Hospital and tel 0044(0)207 8302997
University College Medical School
London
More information about the R-help
mailing list