MRG: Add support for foreground in _Brain#7843
Conversation
| The color of the label text. | ||
| title: str | None | ||
| The title of the scalar bar. | ||
| n_labels: int | None |
mne/viz/_brain/_brain.py
Outdated
| if isinstance(background, str): | ||
| background = colorConverter.to_rgb(background) | ||
| if foreground is None: | ||
| foreground = "white" |
There was a problem hiding this comment.
We should set it to white or black automatically depending on the luminance of the background, see how it's done in PySurfer
|
Can you add to the TODO list to make the |
|
(not necessarily for this PR) |
|
Pushed a commit to fix I did notice a bug with the VectorSourceEstimate plotting -- it looks like the colormap of the arrows are not interactively updated, see how the brain surface and arrow colormaps do not match here: Sample code to reproduce, just click around the sliders and you should see the brain surface change color but the color/alpha of the arrows stays the same: Sample codeIt becomes even more obvious if you set something like |
|
I updated #7162 with #7843 (comment) and #7843 (comment) |
|
merge when happy !
… |
|
Thanks @GuillaumeFavelier |
* upstream/master: MRG: Add support for foreground in _Brain (mne-tools#7843) MRG, MAINT: Change default role in conf.py (mne-tools#7841) MRG, ENH: Support n_col keyword in ica.plot_score (mne-tools#7825) add icons to source dist (mne-tools#7840) Add CZI to list of funders (mne-tools#7839) DOC: added reference to sesameeg package (mne-tools#7835) MRG, ENH: Automatically compute threshold for CTPS ECG detection (mne-tools#7819) MAINT: Show how picks work for planars (mne-tools#7833) Clearer info docstring (mne-tools#7832) MRG, ENH: Add estimation method legend (mne-tools#7830) Remove double spaces (mne-tools#7822) add troubleshooting message about OpenGL [skip travis] (mne-tools#7827) fix links [skip travis] (mne-tools#7826)

This PR adds support for the
foregroundparameter in_Brain. This parameter influences the color of the labels displayed (scalar bar label, time label and slider title and label).Following the example given in #7842 (comment), this is what I obtain now:
Closes #7842
It's an item of #7162