Re: [R] creating a color gradient in geom_ribbon

2017-05-10 Thread Ulrik Stervbo
I haven't tested it but the first thing I'd look at is scale_fill_gradient. HTH Ulrik Jim Lemon schrieb am Do., 11. Mai 2017, 07:22: > Hi Kristi, > It can be done, but it is messy: > > pl = data.frame(Time = 0:10, menle = rnorm(11)) > pl$menlelb = pl$menle -1 >

Re: [R] creating a color gradient in geom_ribbon

2017-05-10 Thread Jim Lemon
Hi Kristi, It can be done, but it is messy: pl = data.frame(Time = 0:10, menle = rnorm(11)) pl$menlelb = pl$menle -1 pl$menleub = pl$menle +1 rg<-0.95 blue<-1 plot(pl$Time,pl$menlelb,ylim=range(c(pl$menlelb,pl$menleub)),type="l", lwd=7,col=rgb(rg,rg,blue))

[R] creating a color gradient in geom_ribbon

2017-05-10 Thread Kristi Glover
Hi R Users, I was trying to create a figure with geom_ribbon. There is a function "fill", but I want to make the shaded area with a gradient (increasing dark color towards a central line, inserted of having a color). Is there any possibility? In the given example, I want the colour with