Not exactly sure what you want to do, but ... In your example, you do not need groups, since the color doesn't change within the levels of the conditioning variable (fact). Hence you can use the panel.number() function to choose the plotting color of each panel, like this:
## .. continuing with your example myColors <- rep(c(2,4),2) xyplot(y ~ x | fact, data = my.df, panel = function(...){ panel.xyplot(...,col=myColors[panel.number()]) } ) If you actually **need** groups (to color different subsets of the data within a panel differently). it does get a bit more complicated. Incidentally, note that col is already a formal argument of panel.superpose and was therefore picked up in the ... argument of the panel.groups function -- that's why you got the error you did when you repeated col explicitly in the panel.xyplot call. By default, it's values are those of trellis.par.get("superpose.symbol") I believe. Also, group.number appears to be undefined in your code. HTH Cheers, Bert Gunter ______________________________________________ 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.