Skip to content

ENH: Add TimeChange behaviour to plot_evoked#14025

Open
Gnefil wants to merge 14 commits into
mne-tools:mainfrom
Gnefil:plot-evoked-timechange
Open

ENH: Add TimeChange behaviour to plot_evoked#14025
Gnefil wants to merge 14 commits into
mne-tools:mainfrom
Gnefil:plot-evoked-timechange

Conversation

@Gnefil

@Gnefil Gnefil commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Implements #14024.

What does this implement/fix?

Adds TimeChange behaviour in mne.viz.plot_evoked(), which is the underlying function for mne.Evoked.plot() too.

Additional information

@Gnefil Gnefil changed the title ENH: add vertical marker in plot evoked that listens to timechange ENH: Add TimeChange behaviour to plot_evoked Jul 4, 2026
@Gnefil Gnefil marked this pull request as ready for review July 8, 2026 17:35
@Gnefil Gnefil requested a review from drammock as a code owner July 8, 2026 17:35
Copilot AI review requested due to automatic review settings July 8, 2026 17:35
@Gnefil Gnefil requested review from agramfort and larsoner as code owners July 8, 2026 17:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds TimeChange UI-event integration to mne.viz.plot_evoked() (and therefore Evoked.plot()), enabling evoked plots to both publish time changes on click and react to externally-published time changes by updating a vertical time marker.

Changes:

  • Publish TimeChange events from evoked butterfly plots on mouse click.
  • Subscribe evoked plots to time_change events and move/update a vertical selection marker accordingly.
  • Add/extend tests to cover click-driven time selection and TimeChange event handling.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
mne/viz/evoked.py Publishes and subscribes to TimeChange events; adds time-marker updates in evoked plots.
mne/viz/tests/test_evoked.py Adds tests ensuring click selection creates a marker and TimeChange updates it.

Comment thread mne/viz/evoked.py Outdated
Comment thread mne/viz/evoked.py
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.

2 participants