'Tim.colors' in 'fields' package goes from blue to red, and passes through
the colors cyan, yellow, and orange. Also known as Jet color-map in Matlab.
You can also easily design your own color map using 'rgb' function from
'gdDevices'.

Jarek
====================================================\=======

 Jarek Tuszynski, PhD.                           o / \ 
 Science Applications International Corporation  <\__,|  
 (703) 676-4192                                   ">   \
 [EMAIL PROTECTED]                     `    \



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of array chip
Sent: Wednesday, August 03, 2005 8:03 PM
To: [email protected]
Subject: [R] color palette

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?

Thanks

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to