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.