ComplexHeatmap
ComplexHeatmap copied to clipboard
Multiple Annotations With Same Colour Scale Cause Many Legends
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.
.
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))