Skip to content

Commit

Permalink
fixing epochs image bug
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Nov 18, 2016
1 parent 7afb903 commit 1d9e8dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/visualization/plot_channel_epochs_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def order_func(times, data):
good_pick = 97 # channel with a clear evoked response
bad_pick = 98 # channel with no evoked response

# We'll also plot a sample time onset for each trial
plt_times = np.linspace(0, .2, len(epochs))

plt.close('all')
mne.viz.plot_epochs_image(epochs, [good_pick, bad_pick], sigma=0.5, vmin=-100,
vmax=250, colorbar=True, order=order_func, show=True)
vmax=250, colorbar=True, order=order_func,
overlay_times=plt_times, show=True)
2 changes: 1 addition & 1 deletion mne/viz/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def plot_epochs_image(epochs, picks=None, sigma=0., vmin=None,
aspect='auto', origin='lower', interpolation='nearest',
vmin=this_vmin, vmax=this_vmax, cmap=cmap[0])
if this_overlay_times is not None:
plt.plot(1e3 * this_overlay_times, 0.5 + np.arange(len(this_data)),
ax1.plot(1e3 * this_overlay_times, 0.5 + np.arange(len(this_data)),
'k', linewidth=2)
ax1.set_title(epochs.ch_names[idx])
ax1.set_ylabel('Epochs')
Expand Down

0 comments on commit 1d9e8dd

Please sign in to comment.