I have found a bug/feature with barplot that at least to me shows undesireable behaviour. When using barplot and plotting fewer groups/levels/factors(I am unsure what they are called) than the number of colors stated in a col statement, the colors wrap around such that the colors are not fixed to one group. This is mostly problematic when I make R figures using scripts, since I sometimes have empty input groups. I have in these cases experienced labeling the empty group as red, and then seeing a bar being red when that bar is actually from a different group.
Reproducible example (I hope): barplot(VADeaths, beside=TRUE, col=c("red", "green", "blue", "yellow", "black")) barplot(VADeaths[1:4,], beside=TRUE, col=c("red", "green", "blue", "yellow", "black")) Now, I don't know if this is a bug or a feature, but it sure bugged me...:) Karin -- Karin Lagesen, PhD student [EMAIL PROTECTED] http://www.cmbn.no/rognes/ ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html