Re: [R] color palette

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Thu 04 Aug 2005 - 10:12:27 EST

On Wed, 3 Aug 2005, array chip wrote:

> Hi, I have a matrix with both positive and negative
> numbers, I would like to use image() to draw a
> heatmap. How can I can design a palette (or is there a
> function already available) that treat negative
> numbers in a blue gradient and positive numbers in a
> red gradient and treat 0 as white?
>

?colorRampPalette

         -thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 04 10:16:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:40 EST