[R] color palette for heatmap?

BD bhakti.dwivedi at gmail.com
Sat Jan 15 17:37:33 CET 2011


Does anyone know how I can specify the colors based on the data values in
I have values ranging from -4 to 25 and I want to specify colors as:

-4 = white
0 = white/snow
10 =darkblue
20 = red
25 = dark red

the command line that I am currently using is (which is close to what I want
but not exactly)
col=colorRampPalette(c("-5" = "white","5" = "white", "10" = "darkblue", "20"
= "red"))(4)
can I get a smooth transition in heatmap colors from white to blue to red in


View this message in context: http://r.789695.n4.nabble.com/color-palette-for-heatmap-tp3219238p3219238.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list