Skip to content

Commit 6a5d11d

Browse files
committed
Merge pull request #2743 from jaeilepp/fix-to-gfp
[MRG] Fix to gfp with ylim.
2 parents b4f5580 + 66473ab commit 6a5d11d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mne/viz/evoked.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ def _plot_evoked(evoked, picks, exclude, unit, show,
306306
if gfp: # 'only' or boolean True
307307
gfp_color = 3 * (0.,) if spatial_colors else (0., 1., 0.)
308308
this_gfp = np.sqrt((D * D).mean(axis=0))
309-
this_ylim = ax.get_ylim()
309+
this_ylim = ax.get_ylim() if (ylim is None or t not in
310+
ylim.keys()) else ylim[t]
310311
if not gfp_only:
311312
y_offset = this_ylim[0]
312313
else:

0 commit comments

Comments
 (0)