Search
Question: Graph for microarray data
0
gravatar for Tim Smith
10.0 years ago by
Tim Smith1.0k
Tim Smith1.0k wrote:
Hi, I was trying to generate a heatmap with three colors (I have three values i.e, -1,0,1). I was using the following code (suggested earlier): ----------------------------------------------- r1 <- matrix(0:1,11,5) r2 <- matrix(-1:0,13,5) matr <- rbind(r1,r2) rownames(matr) <- LETTERS[1:nrow(matr)] colnames(matr) <- 1:5 heatmap(matr,col=c('green','black','red')) --------------------------------------------- What I want is for the -1 values to be green cells, 0 values to be black cells & 1 values to be red cells. However, I only seem to get red and green colors in the cell. What do I need to do to get this right? thanks! [[alternative HTML version deleted]]
ADD COMMENTlink modified 10.0 years ago by Stephen Henderson1.0k • written 10.0 years ago by Tim Smith1.0k
0
gravatar for Stephen Henderson
10.0 years ago by
Stephen Henderson1.0k wrote:
heatmap(matr,col=c('green','black','red'), scale='none') On 19 Sep 2008, at 13:24, Tim Smith wrote: > r1 <- matrix(0:1,11,5) > r2 <- matrix(-1:0,13,5) > matr <- rbind(r1,r2) > rownames(matr) <- LETTERS[1:nrow(matr)] > colnames(matr) <- 1:5 > heatmap(matr,col=c('green','black','red')) Stephen Henderson Viral Oncology (5th Floor) UCL Cancer Institute Paul O'Gorman Building Huntley Street London, WC1E 6BT s.henderson at ucl.ac.uk +44 (0) 207 679 6827
ADD COMMENTlink written 10.0 years ago by Stephen Henderson1.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 122 users visited in the last hour