Entering edit mode
Hi, I am trying to add boxplot annotations to my heatmap similar as in post 1 but with one boxplot per cluster. For a single column heatmap it works as intended:
library(ComplexHeatmap)
ha = HeatmapAnnotation(summary=anno_summary(height=unit(4,"cm")))
v=rnorm(50)
Heatmap(v,name="mat",top_annotation = ha,width=unit(2,"cm"),km=2)
However, when I have two or more columns I get an error or I get the result as described in the above post.
ha = HeatmapAnnotation(summary=anno_summary(height=unit(4,"cm")))
v=cbind(rnorm(50),rnorm(50,1))
Heatmap(v,name="mat",top_annotation = ha,width=unit(2,"cm"),km=2)
Error: number of observations in top annotation should be as same as ncol of the matrix.
Please advise.
Question also posted here 2