[R] barplot: different colors for the bar and the strips

Hao Chen hchen at utmem.edu
Thu Sep 7 13:18:03 CEST 2006


I am using barplot and would like to know if it is possible to have bars
filled with one color while use a different color for the shading lines. 

The following code colors the shading lines, leaving the bars in white:

 barplot(1:5, col=c(1:5), density=c(1:5)*5)

while the colors are applied to the bars when density is removed.

 barplot(1:5, col=c(1:5))

I did check ?barplot and found the following: 

	col: a vector of colors for the bars or bar components. 


More information about the R-help mailing list