Skip to content

Commit

Permalink
BUG: Fix bug with epochs image
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 2, 2024
1 parent c73b8af commit 5247a3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mne/viz/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,9 @@ def _plot_epochs_image(

# draw the colorbar
if colorbar:
from matplotlib.pyplot import colorbar as cbar

if "colorbar" in ax: # axes supplied by user
this_colorbar = cbar(im, cax=ax["colorbar"])
cax = ax["colorbar"]
this_colorbar = cax.figure.colorbar(im, cax=cax)
this_colorbar.ax.set_ylabel(unit, rotation=270, labelpad=12)
else: # we created them
this_colorbar = fig.colorbar(im, ax=ax_im)
Expand Down

0 comments on commit 5247a3d

Please sign in to comment.