Skip to content

Conversation

@aman-coder03
Copy link

What does this PR do?

adds an optional show_channel_names parameter to plot_alignment to overlay channel labels at sensor locations in the 3D alignment view.

Why?

this improves interpretability when inspecting sensor alignment, especially for debugging, teaching, and demonstrations. The feature is fully opt-in and does not change default behavior.

Backward compatibility

fully backward compatible (disabled by default).

Tests

visualization tests pass (dataset-dependent tests skipped as expected).

fixes #13502

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take a look at other files in this directory, to see how they should be formatted (e.g. no heading, and mention the author and PR number)

mne/viz/_3d.py Outdated
Comment on lines 959 to 961
xyz[0],
xyz[1],
xyz[2],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
xyz[0],
xyz[1],
xyz[2],
*xyz,

@drammock
Copy link
Member

drammock commented Jan 2, 2026

@aman-coder03 please also look at our tutorials or examples that use plot_alignment, find one where it wouldn't be distracting to include the sensor names, and change the tutorial to use this new parameter. That way we can see how it looks in the built documentation

@aman-coder03
Copy link
Author

thanks for your suggestion @drammock
I have updated the changes, happy to adjust the example if you prefer a different one.

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.

ENH: Add channel names to plot_alignment

2 participants