Skip to content
Prev 279373 / 398506 Next

barplot ignoring col parameter

On Dec 5, 2011, at 10:44 AM, Federico Calboli wrote:

            
Hard to say, since it involves graphics devices and I cannot reproduce  
it.

 > mydata <- scan()
1:  2 108  0  0  0  1  3  0  0  0  0  0  7 18  3  4  8 20 26 20 19  7   
1  1
25:
Read 24 items
 > barplot(mydata)
 > ?barplot
 > mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2),  
rep('white', 5), rep('orange',3), rep('red',9))
 >
 > barplot(mydata, col = mycol)

Gives a multicolored display on my machine:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.pdf
Type: application/pdf
Size: 39931 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111205/54e3c426/attachment.pdf>
-------------- next part --------------
David Winsemius, MD
West Hartford, CT