R heatmap.2 manual grouping of rows and columns [duplicate]
问题 This question already has answers here : How to create pre-annotated rowside column in heatmap.2 (2 answers) Closed 2 years ago . I have the following MWE in which I make a heatmap without performing any clustering and showing any dendrogram. I want to group my rows (genes) together in categories, in a better looking way than how it is now. This is the MWE: #MWE library(gplots) mymat <- matrix(rexp(600, rate=.1), ncol=12) colnames(mymat) <- c(rep("treatment_1", 3), rep("treatment_2", 3), rep(