[R] barplot colors

Francois De Ryckel fderyckel at aislusaka.org
Tue Mar 26 21:33:37 CET 2013


Hi David,
Thanks a lot for your advice and helping me tricking barplot.  It totally work. 
Have a great evening!
François


On 26 Mar 2013, at 21:43, David L Carlson wrote:

> You will have to trick barplot into thinking you have four groups:
> 
>> wmod <- cbind(c(w[,1], 0, 0), c(0, 0, w[,2]))
>> barplot(wmod, main="2012", col=c("red", "green", "blue", "pink"))
> 
> ----------------------------------------------
> David L Carlson
> Associate Professor of Anthropology
> Texas A&M University
> College Station, TX 77843-4352



More information about the R-help mailing list