mne-tools / mne-tools/mne-python
viz.plot_sensors('3d') doesn't handle mouse clicks to reveal sensor names correctly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
MWE:
from pathlib import Path
import matplotlib
import mne
matplotlib.use('Qt5Agg')
sample_dir = Path(mne.datasets.sample.data_path())
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(sample_fname, preload=False)
raw.plot_sensors('3d')
Clicking on the frontal sensors reveals names of channels someplace else.
https://user-images.githubusercontent.com/2046265/115535014-a6acc000-a298-11eb-881d-bacf661ee57d.mov
When show_names=True is passed, the channels are labeled correctly, though, leading me to believe that the odd behavior described above is related to click -> channel mapping
For completeness, here's a 2D sensor plot:

macOS with Qt5 backend.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided MWE with the Qt5Agg backend and inspect viz.plot_sensors('3d'), comparing click-to-channel mapping with show_names=True and the 2D plot. Done means clicking a frontal sensor reveals that sensor's name at the correct location; the payload does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100