continuous shading in plots
On 02/19/2013 09:50 AM, Jim Lemon wrote:
Hi Elisabeth, For a quick hack, try this: segments(rep(0,100),seq(-4.5,0,length.out=200),rep(14,200), seq(0,4.5,length.out=200), col=rgb(seq(0.8,0.5,length.out=200),seq(0.8,0.5,length.out=200), seq(0.8,0.5,length.out=200)),lwd=2)
and even easier:
library(plotrix)
segments(rep(0,100),seq(-4.5,0,length.out=200),rep(14,200),
seq(0,4.5,length.out=200),col=smoothColors("white",198,"darkgray"))
Jim