From a4dff8b2f8d2a97151f9b0aa1ad0e77fc30e1888 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 8 Nov 2025 09:38:37 +0100 Subject: [PATCH 1/5] FIX: Fix regression with mne.viz.plot_evoked --- mne/viz/evoked.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mne/viz/evoked.py b/mne/viz/evoked.py index 5d57df363be..804e2489f02 100644 --- a/mne/viz/evoked.py +++ b/mne/viz/evoked.py @@ -730,7 +730,6 @@ def _plot_lines( else: y_offset = this_ylim[0] this_gfp += y_offset - ax.autoscale(False) ax.fill_between( times, y_offset, From c305e5974b6ad389249be6547a389944bf0c03de Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 8 Nov 2025 14:36:35 +0100 Subject: [PATCH 2/5] Add changelog --- doc/changes/dev/13481.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changes/dev/13481.bugfix.rst diff --git a/doc/changes/dev/13481.bugfix.rst b/doc/changes/dev/13481.bugfix.rst new file mode 100644 index 00000000000..a813320885e --- /dev/null +++ b/doc/changes/dev/13481.bugfix.rst @@ -0,0 +1 @@ +Fix bug with :func:`mne.viz.plot_evoked` when using ``gfp="only"`` or ``gfp=True``, by `Michael Straube`_. From 6b7b2bfc136953dfc23f2bb0de4babb6cc5e6632 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 16 Nov 2025 08:43:41 +0100 Subject: [PATCH 3/5] Address review comments --- mne/viz/evoked.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mne/viz/evoked.py b/mne/viz/evoked.py index 804e2489f02..58265ccd37e 100644 --- a/mne/viz/evoked.py +++ b/mne/viz/evoked.py @@ -727,9 +727,12 @@ def _plot_lines( ) if gfp_only: y_offset = 0.0 + this_ylim = (0, 1.1 * np.max(this_gfp) or 1) else: y_offset = this_ylim[0] this_gfp += y_offset + ax.autoscale(False) + ax.set_ylim(this_ylim) ax.fill_between( times, y_offset, From e42476e23bf4ab9a696e389eefca14541a8d7d6b Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Mon, 17 Nov 2025 09:34:09 -0600 Subject: [PATCH 4/5] empty commit to trigger CircleCI From e0fa1734bfcb6528e506a8dbb9eb2b1ef76e803b Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Wed, 19 Nov 2025 16:28:00 -0600 Subject: [PATCH 5/5] touch tutorial to render new behavior --- tutorials/evoked/30_eeg_erp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/evoked/30_eeg_erp.py b/tutorials/evoked/30_eeg_erp.py index 9ebfd4e845e..53ff8452578 100644 --- a/tutorials/evoked/30_eeg_erp.py +++ b/tutorials/evoked/30_eeg_erp.py @@ -286,8 +286,8 @@ evk.plot(gfp=True, spatial_colors=True, ylim=dict(eeg=[-12, 12])) # %% -# To plot the GFP by itself, you can pass ``gfp='only'`` (this makes it easier -# to read off the GFP data values, because the scale is aligned): +# To plot the GFP by itself, you can pass ``gfp='only'`` (this makes it easier to +# read off the GFP data values, because the scale is aligned): l_aud.plot(gfp="only")