Use mne.viz.plot_compare_evokeds() to compare each channel of two conditions

  • MNE version: 1.1
  • operating system: Windows 10

Hi! I’m using the mne.viz.plot_compare_evokeds() to compare two conditions with each other. I’m interested in comparing two individual channels, but I haven’t found a way to compare two individual channels under two different conditions using this function. The closest I got was setting axes=‘topo’, but this just plots the channels in separate figures. I would like to get everything in one plot. I suppose I could do something with the “combine” parameter, but except for different ways of combining channels, I haven’t found a way to specify that I don’t want to combine the channels.

In short, is there a way to compare two channels across two conditions?

Thanks!

that function does not currently support plotting multiple channels per condition. If you’re familiar with Seaborn, that might work. You could to evoked.to_data_frame(long_format=True) on the evokeds for each condition, combine the dataframes with pd.concat([df1, df2]), filter it to just the 2 channels you care about using dataframe.loc[...], and then use sns.lineplot(..., hue='condition', size='channel') for example.