Hi MNE community,
I am looking to plot two different populations of participants together on a single compare_evokeds plot. My issue is that experimentally, the same event codes are given to each population. The code I am using to plot my normal, comparing condition evoked waveform is:
conditions = ['Stimulus Onset', 'Response']
data_dir = 'data'
data_files = glob.glob(data_dir + '/randomflick_P*-ave.fif')
print('The data files included are: ' + str(data_files))
evokeds = {}
for idx, c in enumerate(conditions):
evokeds[c] = [mne.read_evokeds(d)[idx] for d in data_files]
print(evokeds)
roi = ['Oz', 'O1', '02']
color_dict = {'Stimulus Onset':'blue', 'Response':'red'}
linestyle_dict = {'Stimulus Onset':'-', 'Response':'--'}
mne.viz.plot_compare_evokeds(evokeds,
combine='mean',
legend='lower right',
picks=roi, show_sensors='upper right',
colors=color_dict,
linestyles=linestyle_dict,
title='Stimulus Onset vs Response Waveforms'
)
Is there a way I can adapt this to read evoked files from two different populations and plot them together? Ideally I would only be plotting the two populations for one event (such as Stimulus Onset).
Thank you in advance,
Mike