Re: [R] Asymmetric colors for heatmap

From: Sean Davis <sdavis2_at_mail.nih.gov>
Date: Wed 27 Jul 2005 - 21:15:51 EST

[R] Asymmetric colors for heatmapSee the breaks argument to heatmap.

Sean

> Dear expeRts,
>
> Currently, my colors are as follows:
> mycol <-
> c("blue1","blue2","blue3","blue4","black","yellow4","yellow3","yellow2","y
> ellow1")
> heatmap(snp, Rowv=NA, Colv=NA, col=mycol)
>
> However, I would like to have the following colors:
> bright blue -> dark blue: for intensity range from 0 to 2 in steps of 0.5
> (i.e. 4 grades of blue)
> black: for intensity 2
> dark yellow -> bright yellow: for intensity range from 2 to 8 in steps of
> 0.5 (i.e. 8 grades of yellow)
>
> You may realize that I want to display copy number data from SNP-chips as
> heatmap.
> Since copynumber = 2, is the default value, I want to display it in black,

> LOH in increasing blue, and amplifications in increasing yellow.
> Even though there may be higher amplification rates, a value of CN=8
> should already display the brightest yellow.
>
> In Spotfire it is easy to achieve this, especially that CN=2 is always
> displayed as black, however, I do not know how to do it in R.
> Can you tell me how I have to create the colors to achieve this?
>
> (P.S.: Of course, I could do: snp[snp>8] <- 8, but this will not solve my
> problem with asymmetric colors)
>
> Thank you in advance
> Christian Stratowa
>
>
>
>
>
>



  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

        [[alternative HTML version deleted]]



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 Wed Jul 27 21:24:28 2005

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