Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Annotations With Same Colour Scale Cause Many Legends #1202

Open
DarioS opened this issue Aug 15, 2024 · 1 comment
Open

Multiple Annotations With Same Colour Scale Cause Many Legends #1202

DarioS opened this issue Aug 15, 2024 · 1 comment

Comments

@DarioS
Copy link

DarioS commented Aug 15, 2024

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
.

@asalt
Copy link
Contributor

asalt commented Oct 16, 2024

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants