Skip to content

FIX: Fix _plot_topomap channel names plotting when using a mask#13470

Merged
drammock merged 5 commits intomne-tools:mainfrom
mistraube:topo
Oct 30, 2025
Merged

FIX: Fix _plot_topomap channel names plotting when using a mask#13470
drammock merged 5 commits intomne-tools:mainfrom
mistraube:topo

Conversation

@mistraube
Copy link
Copy Markdown
Contributor

Reference issue (if any)

Fixes #12906.

What does this implement/fix?

The mask parameter of mne.viz.plot_topomap() does not affect the plotting of channel labels anymore and the labels are plotted as expected now.

Additional information

None.

@larsoner
Copy link
Copy Markdown
Member

Okay CIs are green (Azure+GHA in a previous commit, Circle in the empty one I pushed). @drammock do you agree with the interpretation in #12906 that channel names should always be shown, as opposed to only being shown for the one(s) highlighted by the mask?

@drammock
Copy link
Copy Markdown
Member

@drammock do you agree with the interpretation in #12906 that channel names should always be shown, as opposed to only being shown for the one(s) highlighted by the mask?

IIUC this code will always show sensor names (and always show them with the same appearance)? in other words mask only affects the sensor dots, not the labels. The linked issue suggested:

Case 3: All channel labels should be displayed, with "EEG 001" highlighted or emphasized due to the True value in the mask.

I agree with that, and think it would be good to make the labels of the True sensors bold or something. But "or something" has a lot of room for bikeshedding / exposing knobs in the API / returning handles so the styling can be tweaked after-the-fact. So in the interest of not derailing this bugfix, I think that change should be a separate discussion / separate PR.

@drammock drammock merged commit f09b3da into mne-tools:main Oct 30, 2025
8 checks passed
@mistraube mistraube deleted the topo branch November 1, 2025 17:07
larsoner added a commit to BeiGeJin/mne-python that referenced this pull request Nov 5, 2025
* upstream/main: (230 commits)
  FIX: Fix ICA.apply when fitted including marked bad channels (mne-tools#13478)
  FIX: Correctly set the calibration factor in Nihon Kohden reader (mne-tools#13468)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13479)
  MAINT: Update code credit (mne-tools#13477)
  Fix `versionadded` directive formatting (mne-tools#13471)
  typo in mailmap (mne-tools#13475)
  FIX: Fix _plot_topomap channel names plotting when using a mask (mne-tools#13470)
  FIX: Handle an Eyelink File with blank lines injected throughout file (mne-tools#13469)
  ENH: adds annotation filtering to raw and ica source figures (mne-tools#13460)
  MAINT: Restore VTK nightly wheel on Linux and bump changelog checker (mne-tools#13436)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13465)
  FIX: Fix add_reference_channels for passing two channels names (mne-tools#13466)
  ENH: Add on_missing for combine_channels (mne-tools#13463)
  Bump the actions group with 2 updates (mne-tools#13464)
  Move development dependencies into a dependency group (no more extra) (mne-tools#13452)
  ENH: add on_missing for rename_channels (mne-tools#13456)
  add advisory board to website (mne-tools#13462)
  ENH: Support Nihon Kohden EEG-1200A V01.00 (mne-tools#13448)
  MAINT: Update dependency specifiers (mne-tools#13459)
  ENH: Add encoding parameter to Nihon Kohden reader (mne-tools#13458)
  ...
larsoner added a commit to szz-dvl/mne-python that referenced this pull request Nov 5, 2025
* upstream/main: (85 commits)
  FIX: Fix ICA.apply when fitted including marked bad channels (mne-tools#13478)
  FIX: Correctly set the calibration factor in Nihon Kohden reader (mne-tools#13468)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13479)
  MAINT: Update code credit (mne-tools#13477)
  Fix `versionadded` directive formatting (mne-tools#13471)
  typo in mailmap (mne-tools#13475)
  FIX: Fix _plot_topomap channel names plotting when using a mask (mne-tools#13470)
  FIX: Handle an Eyelink File with blank lines injected throughout file (mne-tools#13469)
  ENH: adds annotation filtering to raw and ica source figures (mne-tools#13460)
  MAINT: Restore VTK nightly wheel on Linux and bump changelog checker (mne-tools#13436)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13465)
  FIX: Fix add_reference_channels for passing two channels names (mne-tools#13466)
  ENH: Add on_missing for combine_channels (mne-tools#13463)
  Bump the actions group with 2 updates (mne-tools#13464)
  Move development dependencies into a dependency group (no more extra) (mne-tools#13452)
  ENH: add on_missing for rename_channels (mne-tools#13456)
  add advisory board to website (mne-tools#13462)
  ENH: Support Nihon Kohden EEG-1200A V01.00 (mne-tools#13448)
  MAINT: Update dependency specifiers (mne-tools#13459)
  ENH: Add encoding parameter to Nihon Kohden reader (mne-tools#13458)
  ...
sseth pushed a commit to xannnimal/mne-python that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected behavior: plot_topomap channel labels affected by mask parameter

3 participants