[BioC] graph for microarray data

James W. MacDonald jmacdon at med.umich.edu
Fri Sep 5 14:39:16 CEST 2008


Hi Tim,

Tim Smith wrote:
> Hi,
> 
> I was just trying to get a heatmap of sorts with data that has only 3 values (-1,0,1). For example:
> 
> ----------------------------------
> library(stats)
>  eg <- matrix(-1:1,10,10)
>  rownames(eg) <- LETTERS[1:10]
>  colnames(eg) <- c(1:10)
>  heatmap(eg)
> 
> -------------------------------
> 
> However, the heatmap that I get has 5 colors. What do I need to do so that only 3 colors (each representing one of 1,0,-1) are displayed?

Specify the colors directly:

heatmap(eg, col = c("red","green","black"))

Best,

Jim


> 
> thanks!
> 
> 
>       
> 	[[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

-- 
James W. MacDonald, M.S.
Biostatistician
Hildebrandt Lab
8220D MSRB III
1150 W. Medical Center Drive
Ann Arbor MI 48109-0646
734-936-8662



More information about the Bioconductor mailing list