Message-ID: <475527FD.2050500@bitwrit.com.au>
Date: 2007-12-04T10:12:13Z
From: Jim Lemon
Subject: color palette from red to blue passing white
In-Reply-To: <f22a33d30712031741i58c3b9a3hf4dd02e04e1bc4db@mail.gmail.com>
Linda Smith wrote:
> Hi All,
>
> I am looking for a color palette like this:
> http://www.ncl.ucar.edu/Applications/Images/h_long_5_lg.png
>
> I think I found out how some time ago (something like Colors[1:n]), but when
> I now wanna use it, I could not remember how I did it.
>
> Does anyone know which package I could use?
>
Hi Linda,
You can do it with color.legend in plotrix.
plot(1:10)
color.legend(1,8,7,8.5,align="rb",
rect.col=color.scale(1:21,c(0,1,0.5),c(0,1,0),c(0.5,1,0)),
legend=seq(-50,50,by=10))
Jim