Re: [R] color palette

From: array chip <>
Date: Fri 05 Aug 2005 - 02:31:03 EST

Thanks for the suggestion. I still could not figure out how to use the function to do my job. What's important in my job is that I have to map white color to value 0, and then form a bue gradient for negative values, and red gradient for positive values. The data matrix I have is not symmetric aound 0, say 0 is at the 18 percentile, and values range from -10 to 30. How exactly I could do my job? Bear with me, I am new to color, I don't quite understand how the image function map the number is the data matrix to the colors defined in the col argument.


> 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
> mailing list PLEASE do read the posting guide! Received on Fri Aug 05 02:35:31 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:04:16 EST