Re: [R] colour palette for positive/negative range

From: Kevin Wright <kw.stat_at_gmail.com>
Date: Fri, 18 Mar 2011 10:49:22 -0500

Some ideas for you...

RedWhiteBlue <- colorRampPalette(c("firebrick","white","#023868")) RedGrayBlue <- colorRampPalette(c("firebrick", "lightgray", "#023868")) RedWhiteBlue2 <- colorRampPalette(c("red","white","blue")) RedGrayBlue2 <- colorRampPalette(c("red", "lightgray", "blue")) pie(rep(1,21), col=RedWhiteBlue(21))

Kevin Wright

On Fri, Mar 18, 2011 at 10:37 AM, Frank Schwach <fs5_at_sanger.ac.uk> wrote:

> Hi,
>
> I'm plotting a heatmap with values ranging from -10 to +10 and I would
> like the negative values to show up in shades of blue and the positive
> ones in shadea of red. Basically, I want exactly what the RColorBrewer
> palette RdBu does but with more of a gradual change (the RdBu can only
> give me 11 distinct colours). Any suggestions?
>
> Thanks!
>
> Frank
>
>
>
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a
> company registered in England with number 2742969, whose registered
> office is 215 Euston Road, London, NW1 2BE.
>
> ______________________________________________
> 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.
>

        [[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. Received on Fri 18 Mar 2011 - 15:58:01 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 Fri 18 Mar 2011 - 16:00:23 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.

list of date sections of archive