-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ENH: multiple colors for ica.plot_sources(evokeds) #9444
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
Conversation
|
Good start! I would differentiate categories by line style and components by color 💪 |
Thank you for the idea. How big is the possible number of different categories I should account for? |
|
So far I've only seen two in real life (ECG and EOG), not sure if we even support anything else right now? 😅 |
8611cff to
412b085
Compare
15b617f to
271f2c1
Compare
|
Thanks @marsipu! Can you touch one of the ICA tutorials so we can actually see the effects in the generated report? https://mne.tools/stable/auto_tutorials/preprocessing/40_artifact_correction_ica.html?highlight=ica#using-a-simulated-channel-to-select-ica-components might be a good place! By "touching" I really mean, simply changing a tiny little thing, e.g. improving phrasing somewhere, to enforce re-rendering of the tutorial |
|
Where do I find the generated report? |
|
Thank you! I also created this gist to test multiple component-categories. |
|
It's working! 🥳 I'm not a big fan of the color map though, can we try to see what it looks like e.g. with |
|
anyone feel free to MRG if happy. thx @marsipu |
I tend to agree with @hoechenberger here, that we should stick with MPL default color choices (which in this case means |
|
@drammock thank you for the feedback. I agree that especially the example from the gist doesn't proof the point of differentiating the components more easily. I also think that showing multiple component-types together is probably more rare than multiple components from the same type. At the moment, I just use the 4 named matplotlib linestyles, so displaying more than 4 different components with the same color but different linestyles would then lead to the original problem that components could not be differentiated (these could of course expanded with custom linestyles, but that would maybe not help much in terms of differentiation). So as you suggest I would keep it the way it is currently implemented and change the colormap to |
|
This looks fantastic! |
|
in it goes! Thanks @marsipu |
|
Thank you:). Somehow #9417 wasn't closed |
|
Thanks @marsipu |
This fixes a regression that I believe was introduced via mne-tools#9444


Reference issue
For #9417
What does this implement/fix?
This is supposed to make the differentiation of multiple ICA-components displayed for evokeds easier by displaying them in different colors.
Questions
Are there more ICA-Categories than EOG/ECG which would be displayed simultaneously to consider?
In this draft I accounted for different categories by assigning a different colormap for each one.