ENH: Route evoked.plot() through MNELineFigure#13795
Open
PragnyaKhandelwal wants to merge 3 commits intomne-tools:mainfrom
Open
ENH: Route evoked.plot() through MNELineFigure#13795PragnyaKhandelwal wants to merge 3 commits intomne-tools:mainfrom
PragnyaKhandelwal wants to merge 3 commits intomne-tools:mainfrom
Conversation
When evoked.plot() creates its own figure (axes=None), now routes through _line_figure() to instantiate MNELineFigure instead of a plain matplotlib figure. This aligns with the 2D plotting figure-class refactor direction discussed in mne-tools#7751. Behavior unchanged for custom axes. Both plot_white() and plot_joint() remain out of scope here. Adds regression test to assert MNELineFigure instantiation for default path. Closes mne-tools#13747
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Closes #13747
Related to #7751
What does this implement/fix?
When evoked.plot() creates its own figure (axes=None), it now routes through _line_figure() to instantiate MNELineFigure instead of a plain Matplotlib figure.
This aligns the default 2D plotting path with the refactor direction discussed in #7751, while keeping behavior unchanged when users pass custom axes.
Scope is intentionally limited:
evoked.plot_white() is out of scope
evoked.plot_joint() is out of scope
A regression test was added to assert MNELineFigure instantiation for the default evoked.plot() path.
Additional information
This is a localized, backward-compatible enhancement intended as an incremental step toward #7751, not a full closure of that broader refactor.