diff --git a/.mailmap b/.mailmap index 8a03ada339d..f76582bc657 100644 --- a/.mailmap +++ b/.mailmap @@ -233,7 +233,7 @@ Mathieu Scheltienne Mathieu Scheltienne <7389361 Mathieu Scheltienne Mathieu Scheltienne Mathurin Massias mathurinm Mathurin Massias mathurinm -Mats van Es Mats Mats Matt Sanderson monkeyman192 Matteo Anelli Matteo Anelli Matteo Visconti di Oleggio Castello Matteo Visconti dOC diff --git a/doc/changes/dev/13470.bugfix.rst b/doc/changes/dev/13470.bugfix.rst new file mode 100644 index 00000000000..a17c377e45e --- /dev/null +++ b/doc/changes/dev/13470.bugfix.rst @@ -0,0 +1 @@ +Fix bug with :func:`mne.viz.plot_topomap` that caused unexpected channel name plotting when using a mask, by `Michael Straube`_. \ No newline at end of file diff --git a/mne/viz/topomap.py b/mne/viz/topomap.py index 5627c2d7237..1bd585bb4f1 100644 --- a/mne/viz/topomap.py +++ b/mne/viz/topomap.py @@ -1422,11 +1422,8 @@ def _plot_topomap( if isinstance(outlines, dict): _draw_outlines(axes, outlines) - if names is not None: - show_idx = np.arange(len(names)) if mask is None else np.where(mask)[0] - for ii, (_pos, _name) in enumerate(zip(pos, names)): - if ii not in show_idx: - continue + if names is not None and sensors: + for _pos, _name in zip(pos, names): axes.text( _pos[0], _pos[1],