Re: [R] Gradients in bar charts XXXX

2012-04-13 Thread Greg Snow
Here is one approach: tmp <- rbinom(10, 100, 0.78) mp <- barplot(tmp, space=0, ylim=c(0,100)) tmpfun <- colorRamp( c('green','yellow',rep('red',8)) ) mat <- 1-row(matrix( nrow=100, ncol=10 ))/100 tmp2 <- tmpfun(mat) mat2 <- as.raster( matrix( rgb(tmp2, maxColorValue=255), ncol=10) ) for(i in

Re: [R] Gradients in bar charts XXXX

2012-04-10 Thread Jim Lemon
On 04/10/2012 04:40 AM, Jason Rodriguez wrote: Hello, I have a graphics-related question: I was wondering if anyone knows of a way to create a bar chart that is colored with a three-part gradient that changes at fixed y-values. Each bar needs to fade green-to-yellow at Y=.10 and from yellow-to

Re: [R] Gradients in bar charts XXXX

2012-04-09 Thread ilai
On Mon, Apr 9, 2012 at 12:40 PM, Jason Rodriguez wrote: > Hello, I have a graphics-related question: > > I was wondering if anyone knows of a way to create a bar chart that is > colored with a three-part gradient that changes at fixed y-values. Each bar > needs to fade green-to-yellow at Y=.10 a