Open bbalog87 opened 4 years ago
I bet we could track the code to when the labels are generated but is more painstaking -- in fact I had the some query yesterday, quoted below -- .
Dear Raivo,
I came across your great package pheatmap from work and managed one with very simple commands as below-- we would like to alternate colours of the column labels underneath but could not furnish it.
Is it possible?
Thanks so much,
Jing Hua
This should work
colors[1:21] <- c("black")
for (i in c(1,5) ){ colors[i] <- "red" }
hm$gtable$grobs[[4]]$gp <- gpar(col=colors)
where hm is the pheatmap object
change 4 to 3 to access the column data
Hi all,
Thanks for this great package. # I am wondering whether there is an option/parameter to customize the front color for specific row/column labels. That's, for example, assigning the same colors used for group (column) annotation to the corresponding genes (rows).