[R] Specific criteria for color palette using heatmap.2

2009-09-21 Thread bioinformatics_guy
I'm trying to display the probability space of a function and wanted to see specifically where the maximum posterior probability is. data=read.table(PosteriorData,header=F) mat=as.matrix(data) heatmap.2(mat/max(mat,na.rm=T),dendrogram=c(none),trace=c(none),

Re: [R] Specific criteria for color palette using heatmap.2

2009-09-21 Thread Schalk Heunis
I think this is what you want, using the volcano dataset as an example: data(volcano) heatmap.2(volcano / max(volcano), col=c(heat.colors(16)[1:15],black)) Basically, setting the last color to be black. If you want better control over exactly what range should be black, you can set the breaks