Skip to content

Heatmap/Color Selection(Key)

3 messages · rashid kazmi, Eik Vettorazzi

2 days later
#
Hi Rashid,
you may have a look at the colorRampPalette-function, along with the
"at" argument oh heatmap.2

x<-matrix(runif(100,-6,6),nrow=10)
heatmap.2(x,col=colorRampPalette(c("blue","lightblue","darkgray","darkgray","yellow","red"),space="Lab"),at=c(-6.01,6.01,51))
# or just using the colors you posted
heatmap.2(x,col=c("blue","lightblue","darkgray","black","darkgray","yellow","red"),at=-3:3*2)

hth.

Am 08.10.2010 17:03, schrieb rashid kazmi:

  
    
#
sorry, typo:
should be read as

heatmap.2(x,col=colorRampPalette(c("blue","lightblue","darkgray","darkgray","yellow","red")),breaks=seq(-6.01,6.01,length.out=51))
heatmap.2(x,col=c("blue","lightblue","darkgray","darkgray","yellow","red"),breaks=-3:3*2)

"at" from stats:heatmap became "breaks" in gplots:heatmap.2