Skip to content
Back to formatted view

Raw Message

Message-ID: <5122B996.3040600@bitwrit.com.au>
Date: 2013-02-18T23:30:30Z
From: Jim Lemon
Subject: continuous shading in plots
In-Reply-To: <5122B023.3070808@bitwrit.com.au>

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