ComplexHeatmap icon indicating copy to clipboard operation
ComplexHeatmap copied to clipboard

Multiple Annotations With Same Colour Scale Cause Many Legends

Open DarioS opened this issue 1 year ago • 1 comments

Let's say we have five treatments for each sample, each with levels Resistant, Sensitive. It is presently not possible to define HeatmapAnnotation without a legend for each variable but a single master legend.

image .

DarioS avatar Aug 15 '24 11:08 DarioS

A possible solution is you could define multiple HeatmapAnnotations and stack them on top of each other (or next to each other if rowAnnotation), and set show_legend = FALSE for all but one. You can control the legend title as well if you use the list syntax columnAnnotation(Class = anno_simple(metadata$Erlotinib))

asalt avatar Oct 16 '24 23:10 asalt