Re: [R] Asymmetric colors for heatmap

From: <Christian.Stratowa_at_vie.boehringer-ingelheim.com>
Date: Thu 28 Jul 2005 - 00:13:41 EST


Sorry, my mistake, I did not realize that image() has breaks and that heatmap() inherits from image().
However, I have the following problem, maybe I am doing something wrong.

I have defined:

   mycol <-
c("blue1","blue2","blue3","blue4","black","yellow4","yellow3","yellow2","yel low1")

   breaks<-c(0,0.5,1,1.5,2,2.5,3,4,5,6)

When I call image() then the colors change slightly:

   image(t(tmp),col=mycol,axes=F)
   image(t(tmp),col=mycol,axes=F,breaks=breaks)

However, when I call heatmap():

   heatmap(tmp,Rowv=NA,Colv=NA,col=mycol)    heatmap(tmp,Rowv=NA,Colv=NA,col=mycol,breaks=breaks) then breaks results in half of the heatmap drawn in white!

Do you know what may be my mistake?

Best regards
Christian

-----Original Message-----

From: Stratowa,Dr.,Christian FEX BIG-AT-V Sent: Wednesday, July 27, 2005 14:07
To: 'Sean Davis'; r-help@stat.math.ethz.ch Subject: RE: [R] Asymmetric colors for heatmap

Dear Sean

Thank you, however the heatmap() function from the stats package does not have this option.
Browsing around I see that you mean heatmap.2() from package gplots, which we have not
installed yet.

Is there also another possibility besides heatmap.2() since I would also need this option for
e.g. function image().

Best regards
Christian

-----Original Message-----

From: Sean Davis [mailto:sdavis2@mail.nih.gov] Sent: Wednesday, July 27, 2005 13:16
To: Christian.Stratowa@vie.boehringer-ingelheim.com; r-help@stat.math.ethz.ch
Subject: Re: [R] Asymmetric colors for heatmap

See the breaks argument to heatmap.

Sean



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 28 00:22:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:03 EST