heatmap.2 - centering the color ramp
2
0
Entering edit mode
@hartmut-scheel-2804
Last seen 9.6 years ago
Hello, a short question. How would one manage to have the color range centred around 0 instead of assigning the extreme colors (say red and green) to the lowest and largest value? Black should be at "0" and not at the mean value between the largest and the smallest value. I need to compare different heatmaps. Thanks for any suggestion Hartmut Here some simple Data: mdat <- matrix(c(1.09761079662642,0.552868871011303,0.236339539168374,-0.15682 01 09742826,0.0908534304511135,-0.500217879852688,-0.182786075741673,-0.2 48 107861595691,-0.362157939675895),ncol=3,nrow=3,dimnames=list(c("C1","C 2" ,"C3"),c("T1","T2","T3"))) heatmap.2(mdat,Rowv=NULL,Colv="Rowv", scale="none",col=greenred(75),key=TRUE, symkey=FALSE, density.info="none", trace="none",dendrogram="none") [[alternative HTML version deleted]]
• 2.6k views
ADD COMMENT
0
Entering edit mode
Artur Veloso ▴ 340
@artur-veloso-2062
Last seen 9.6 years ago
Dear Hartmut, Does breaks do what you need? heatmap.2(mdat,Rowv=NULL,Colv="Rowv", scale="none",col=greenred(75),key=TRUE, symkey=FALSE, density.info="none", trace="none",dendrogram="none" ,breaks=seq(-1,1,length.out=76)) Cheers, Artur On Fri, May 16, 2008 at 11:51 AM, Hartmut Scheel <hartmut@miltenyibiotec.de> wrote: > > Hello, > a short question. How would one manage to have the color range centred > around 0 instead of assigning the extreme colors (say red and green) to > the lowest and largest value? Black should be at "0" and not at the mean > value between the largest and the smallest value. I need to compare > different heatmaps. > > Thanks for any suggestion > Hartmut > > Here some simple Data: > mdat <- > matrix(c(1.09761079662642,0.552868871011303,0.236339539168374,-0.156 8201 > 09742826,0.0908534304511135,-0.500217879852688,-0.182786075741673,-0 .248 > 107861595691,-0.362157939675895),ncol=3,nrow=3,dimnames=list(c("C1", "C2" > ,"C3"),c("T1","T2","T3"))) > > heatmap.2(mdat,Rowv=NULL,Colv="Rowv", > scale="none",col=greenred(75),key=TRUE, symkey=FALSE, > density.info="none", trace="none",dendrogram="none") > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Max Kauer ▴ 140
@max-kauer-2254
Last seen 7.5 years ago
Hi, the way I do that is with the heatmapCol function of the SLmisc package. cheers, max -----Urspr?ngliche Nachricht----- Von: bioconductor-bounces at stat.math.ethz.ch im Auftrag von Hartmut Scheel Gesendet: Fr 16.05.2008 17:51 An: bioconductor at stat.math.ethz.ch Betreff: [BioC] heatmap.2 - centering the color ramp Hello, a short question. How would one manage to have the color range centred around 0 instead of assigning the extreme colors (say red and green) to the lowest and largest value? Black should be at "0" and not at the mean value between the largest and the smallest value. I need to compare different heatmaps. Thanks for any suggestion Hartmut Here some simple Data: mdat <- matrix(c(1.09761079662642,0.552868871011303,0.236339539168374,-0.15682 01 09742826,0.0908534304511135,-0.500217879852688,-0.182786075741673,-0.2 48 107861595691,-0.362157939675895),ncol=3,nrow=3,dimnames=list(c("C1","C 2" ,"C3"),c("T1","T2","T3"))) heatmap.2(mdat,Rowv=NULL,Colv="Rowv", scale="none",col=greenred(75),key=TRUE, symkey=FALSE, density.info="none", trace="none",dendrogram="none") [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 737 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6