mne-tools / mne-tools/mne-python

viz.plot_alignment()'s "R" key binding doesn't fully reset the scene

Open
#9,546 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ENH VIZ
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Bug:
I was told that pressing the R key in the figure created by plot_alignment() is supposed to reset the camera / head to its initial position. However, it appears to only move the camera to a pre-defined distance from the center (which is not equal to the initial distance when the figure is first created), but doesn't reset any rotation, which is what I'm usually most concerned about.

Feature request:
Also I didn't know there even were keyboard shortcuts until @agramfort told me so. Would be nice to make this more discoverable – thinking of something like the toolbar we have for Brain, but simply adding some text, e.g., "Press R to reset the view" would already be very helpful.

cc @GuillaumeFavelier

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation and keyboard handler for viz.plot_alignment(), then reproduce the R-key behavior and compare it with the scene's initial camera and rotation. Done means R restores the initial view, including rotation, and the figure makes the shortcut discoverable through text or a toolbar-like cue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.