Re: [R] color palette from red to blue passing white

From: Achim Zeileis <Achim.Zeileis_at_wu-wien.ac.at>
Date: Tue, 4 Dec 2007 05:08:51 +0100 (CET)

On Mon, 3 Dec 2007, jim holtman wrote:

> see if this is what you need:
>
> require(lattice)
> x <- matrix(1:100,10)
> levelplot(x,col.regions=colorRampPalette(c('dark red','white','dark blue')))

Instead of colorRampPalette(), you could also use diverge_hcl() in package "vcd" to get a perceptually-based version, e.g.,

  levelplot(x, col.regions = diverg_hcl(16))

>
>
> On Dec 3, 2007 5:41 PM, Linda Smith <lsmithingm@gmail.com> 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?
> >
> > Many thanks!
> >
> > Linda
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help_at_r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem you are trying to solve?
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 04 Dec 2007 - 04:10:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Dec 2007 - 10:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.