Dear R Users, I have a basis question regarding the use of color in the lattice package. I read the ?barchart help page and searched the R archives but could not understand how to do it.
I just need to plot a barchart using specific colors for my groups, e.g. green and red instead of the default lattice colors. How do I do that? If I say: barchart(x ~ a_factor, groups=my_groups, data=my_data, col=c('green', 'red'), auto.key=TRUE) then my barplot has the correct colors, but the legend does not. What is the correct approach to set colors in barchart? Thanks Alex [[alternative HTML version deleted]] ______________________________________________ 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.