[R] lattice/seqplot group colors

Dieter Menne dieter.menne at menne-biomed.de
Sat Feb 25 16:38:13 CET 2012


Found it. Use level instead of groups. 

# seqplot bar coloring
library(latticeExtra)
d = data.frame(acid=letters[1:10],lwr=rnorm(10),
               essential=rep(c(TRUE,FALSE),each=5))
d$upr = d$lwr+1

# Works as expected
barchart(acid~lwr,data=d,
         groups=essential,
         par.settings=list(plot.polygon=list(col=c("red","blue"))))

# looks like groups not used
segplot(acid~lwr+upr,data=d,
        level=essential,
        par.settings=list(plot.polygon=list(col=c("red","blue"))))





--
View this message in context: http://r.789695.n4.nabble.com/lattice-seqplot-group-colors-tp4420288p4420296.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list