Hi,

I wanted to make more than one side color bar. For example, I can make one side 
color bar (col1) with the following code:
-----------------------------------
library(gplots)

mat <- matrix(sample(1:100,40),nrow=5)
class1 <- c(rep(0,4),rep(1,4))
col1 <- ifelse(class1 == 0,"blue","red")
class2 <- c(rep(1,3),rep(2,5))
col2 <- ifelse(class2 == 0,"yellow","green")

heatmap.2(mat,col=greenred(75),ColSideColors=col1,trace="none",
          dendrogram = "column",labCol = NULL)


-----------------------------------
How can I modify the code so that both col1 & col2 are displayed in the 
heatmap? 
thanks!


      
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to