mne-python
mne-python copied to clipboard
Add the possibility to provide custom color mapping for channels in raw.plot()
Describe the new feature or enhancement
Hello, I think that it would be nice to have the possibility to have a custom color mapping control based on the provided channel names, because it doesn't seems to be possible so far. Please correct me if I am wrong.
Here is an example of a default raw.plot()
And for example I would like to plot every SFG channel into red, and MFG into green.
Describe your proposed implementation
One way would be to provide a dict in the color arg*, the key of the dict should be the channel name and the value should be the desired color.
color = {'SFG, Left':'red', 'SFG, Right':'red', 'MFG, Left':'green', 'MFG, Right':'green'}
raw.plot(color=color)
Describe possible alternatives
One of the possible alternative would be to change colors for specific channel would be to change the ch_types of the desired ch_names. basically assigning SFG to EMG types, MFG to EEG and so on, but it's not really convenient.
Additional context
Thank you!
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
seems like a reasonable feature request. Are you interested in implementing it yourself? As a purely aesthetic change it might be a bit before it reaches the top of our core devs' priority queues.