[R] color for lattice box plots

Tom Bonen tom.bonen at googlemail.com
Mon Sep 22 00:09:01 CEST 2008


hi,

i have a figure with many boxplots and want to differentiate one group
of the boxplots by colour of the box. so for example:

X <- replicate(3,rnorm(100))
bwplot(X[,1]~as.factor(X[,2]>1)|X[,3]>0)

# this gives four boxplots, i'd like to give 1 and 3 a different
colour than 2 and 3

# i tried
bwplot(X[,1]~as.factor(X[,2]>1)|X[,3]>0,groups=as.factor(X[,2]>1))

but that does not change the display? how can i change the colour for
groups with bwplot? thanks.

tom



More information about the R-help mailing list