[R] heatmap

vincent@7d4.com vincent at 7d4.com
Mon Oct 3 14:41:41 CEST 2005


Andrea Zangrando a écrit :

> ... and I wish to change the gradation of colors 
> from blue to red, how could  i do?

Hello,
here's how I build such a palette.

a = 15;
palwhiteblue = rgb(a:0, a:0, a, max=a);
palredwhite  = rgb(a, 0:a, 0:a, max=a);
palwhite     = rep(rgb(1,1,1), 8);
palRWB       = c(palredwhite, palwhite, palwhiteblue);

of course, to adapt to your own uses.
hih
Vincent




More information about the R-help mailing list