bemobil_mne.viz.plot_ERP#
- bemobil_mne.viz.plot_ERP(inst_dict, *, ci=0.68, picks=None, combine=None, is_sources=False, kwargs=None, baseline=None, roi=None)[source]#
Plot Event-Related Potentials (ERP) for given events.
This function is the main plotting function for ERPs, which can handle both dictionaries of mne.Epochs and mne.Evoked objects. It takes care of setting up the figure, plotting the data, and adding sensor insets if requested. Keyword arguments can be passed to customize the plot.
- Parameters:
- inst_dict
dict Dictionary of epochs or evoked, grouped by condition such as:
{"condition": mne.Epochs}or{"condition": mne.Evoked}. If epochs are passed, the ERPs are computed by averaging over epochs.- ci
float Confidence interval to display over epochs. Defaults to 0.68 (68% CI).
- picks
listofstrorlistofint,optional Channel names or, in the case of ICA, channel indices, e.g., [3]. Defaults to
None, which means picking all channels or sources.- combine
str|None If str, may be one of {‘mean’, ‘median’, ‘gfp’, ‘std’}, which will then use the specified metric to combine all channels (or sources) specified via picks. If None, each channel (or source) will be plotted separately.
- is_sourcesbool,
optional If True, indicates that the input data are ICA sources. Defaults to False.
- kwargs
dict,optional Additional keyword arguments passed to the plotting function. For more information see the documentation of mne.viz.plot_compare_evokeds.
- baseline
tuple|None Which time window to mark as the baseline in the plot. Must be a tuple of two floats (start, stop).
- roi
tuple|None Which time window to mark as the region of interest in the plot. Must be a tuple of two floats (start, stop).
- inst_dict
- Returns:
- fig
matplotlib.figure.Figure The resulting figure containing the ERP plots.
- fig
See also
mne.viz.plot_compare_evokedsFor more information on the ERP plotting function