You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mne.viz.plot_source_estimates docs incorrectly say colormap can be supplied as an ndarray #13189
Name of colormap to use or a custom look up table. If array, must be (n x 3) or (n x 4) array for with RGB or RGBA values between 0 and 255. The default (‘auto’) uses 'hot' for one-sided data and ‘mne’ for two-sided data.
But then in _process_clim there is a call to _validate_type(colormap, (str, Colormap), "colormap"), which throws an error if an ndarray is supplied.
I think in this case it's probably best to update the documentation, and maybe somewhere link to ListedColormap to show people how to easily go from an ndarray to a colormap.
Or we could add support to do this, it would in theory only be a few lines since ListedColormap should do all the sanity checking when passed an ndarray I think...
Activity
welcome commentedon Apr 4, 2025
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
larsoner commentedon Apr 4, 2025
I think in this case it's probably best to update the documentation, and maybe somewhere link to ListedColormap to show people how to easily go from an ndarray to a colormap.
Or we could add support to do this, it would in theory only be a few lines since
ListedColormapshould do all the sanity checking when passed anndarrayI think...Dpereaptkhamur-13 commentedon Apr 7, 2026
Hi! I'm a GSoC 2026 applicant. I'd like to fix this documentation discrepancy in plot_source_estimates. May I take this up?
tsbinns commentedon Apr 7, 2026
Hi @Dpereaptkhamur-13, looks like this particular one is already being worked on: #13797.