-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Annotation label & legends with spaces in the title #101
Comments
Thanks for your feedback, it has already been fixed. You can pass |
Thanks so much for such a quick response! I can confirm that using title in legend_kws works but I think that may have broken the label argument. I added both title and label and get this error: Same as above except I added label |
Why did you add the parameter |
I'm following the example link you gave in the previous message (advanced usage) |
Oh sorry, I misread which dict you meant. I see what I can do with using a dict into the Heatmap. thanks. But I think the above will still be confusing for others if there is no label directive but it's in the adv usage instructions. cheers |
I also added the parameter |
You don't have to pass a dict to |
Is there a way to set each row of the annotation with text that has spaces? In my example, I would like the legend title to say "Enrol Group" with a space between the words. And similarly for the label of the row. Or is there a way for title in legend_kws to overwrite the variable value?
I've tried using
legend_kws={'color_text':False, 'title': "Enrol Group"}
in anno_simple but because it's taking the variable name as the title and label, I get this error:TypeError: matplotlib.axes._axes.Axes.legend() got multiple values for keyword argument 'title'
# variable = EnrolGroup which is the title in the legend and label of that row
col_ha = HeatmapAnnotation(EnrolGroup=anno_simple(df["Enrolment Group"],add_text=True,legend=True , legend_kws={'color_text':False, 'title': "Enrol Group"} plot=True,legend=True,legend_gap=3 , legend_order=True , label_side='left' )
The text was updated successfully, but these errors were encountered: