Skip to content
Prev 132326 / 398506 Next

bar plot colors

Winkel, David wrote:
Hi David,
This is a real challenge:

heights<-matrix(sample(10:70,54),ncol=3)
bar.colors<-rep(rep(2:7,each=3),3)
bar.densities<-rep(10,54)
bar.angles<-matrix(rep(rep(c(45,90,135),6),3),ncol=3)
barplot(heights,col=bar.colors)
barplot(heights,angle=bar.angles,add=TRUE,density=bar.densities)

Jim