Open JohannesWiesner opened 1 week ago
Hi Johannes,
I don't have the authority to say yes or no to this (would need @larsoner , @drammock, or @adam2392 for that), but just to explore what you're thinking of: are you imagining node_colors_legend
as a boolean? Also, how do you envision it would interact with the existing node labels, e.g., should just a regular vertical legend be shown instead of the radial labels?
Cheers, Thomas
As with #245 I wonder if this could be done easily enough with some call to ax.legend(...)
after the figure is created? That way users have the flexibility to decide what needs to be in the legend and what doesn't, etc.
what you're thinking of: are you imagining node_colors_legend as a boolean?
Good question but now that you're asking: I have only thought about categorical color scales, i.e. each node is assigned to one category that maps to a certain color (e.g. left hemisphere = blue, right hemisphere = red). But there could be cases where users might want to map a continuous property.
My first intuition was a simple legend that maps discrete colors to labels. Similar to:
https://stackoverflow.com/questions/62894563/add-3-or-more-legends-to-a-seaborn-clustermap
In that case node_colors_legend
could for example by a dictionary that maps strings (the labels) to R,G,B values.
As with #245 I wonder if this could be done easily enough with some call to
ax.legend(...)
after the figure is created? That way users have the flexibility to decide what needs to be in the legend and what doesn't, etc.
Will try this out!
If your issue is a usage question, please consider asking on the MNE Forum instead of opening an issue.
Describe the problem
mne_connectivity.viz.plot_connectivity_circle
allows you to map node names to colors by providing anode_colors
argument. However, in order for the viewer to understand these colors it would be useful if a categorical legend could be added that maps each color to the corresponding label.Describe your solution
Add
node_colors_legend
as argument.Describe possible alternatives
A clear and concise description of any alternative solutions or features you have considered.
Additional context
Add any other context or screenshots about the feature request here.