show data under cursor in epochs_obj.plot_image

  • MNE version: 1.8.0
  • operating system: Red Hat Enterprise Linux 8.8

** k = 0
fig = plt.figure(figsize=(18, 10))
chan_name = epochs_obj.ch_names[k]
grid = GridSpec(6, 18, wspace=0.1, hspace=0.1)

ax1 = plt.subplot(grid[:4, :8])
ax2 = plt.subplot(grid[:4, 8:9])
ax3 = plt.subplot(grid[4:6, :8])

# Remove condition from the plot call
epochs_obj['asteroids_hit'].plot_image(
    picks=chan_name,
    axes=[ax1, ax3, ax2],
    title='Subject' + subject_id + " " + chan_name +', (hit)',
    cmap='interactive'
)
fig.show().**

I can plot figures successfully, with the code above, but I need to be able to see the data points under the cursor to perform the visual QC.

For instance, I would like to know what trials at a specific time point look differently from others. How do I need to modify the code?

Look in the top-right corner of the figure window, it should show the data-coordinates of your cursor.

For example, in the figure below, my mouse cursor was hoovering on epoch 271

Hi Marijn,

Thank you for your response.

What code did you use?
My code produces a figure that does not pop up in a separate window and is does not show coordinates the way it shows for you.
Many thanks!

Hi Marijn,
The issue was that I worked on a supercluster that would not allow producing pop up figures. The code works as described when I run it on my personal computer.
Thank you again!