# NOT RUN {
data(col3x2)
col3x2
# }
# NOT RUN {
library(RColorBrewer)
library(lattice)
col3x2 <- c(brewer.pal(n=3, "Dark2"), brewer.pal(n=3, "Set2"))
col3x2
## save(col3x2, file="col3x2.rda") ## data(col3x2, package="HH")
# }
# NOT RUN {
# }
# NOT RUN {
barchart(~ 1:6, col=col3x2, lwd=0, origin=0, horizontal=FALSE,
scales=list(x=list(at=1:6, labels=col3x2)))
tmp <- array(c(1, rep(0,6)), c(1,3,2,6),
dimnames=list("",
c("green","orange","blue"),
c("Dark2","Set2"),
col3x2))
useOuterStrips(barchart(tmp, col=col3x2,
between=list(x=1, y=1),
scales=list(x=list(at=-1)),
main="col3x2", xlab="")) +
layer(panel.text(x=.5, y=1.45, labels=col3x2[panel.number()]))
# }
Run the code above in your browser using DataLab