yasa.SWResults.plot_average#
- SWResults.plot_average(center='NegPeak', hue='Channel', time_before=0.4, time_after=0.8, filt=(None, None), mask=None, figsize=(6, 4.5), **kwargs)[source]#
Plot the average slow-wave.
- Parameters:
- centerstr
Landmark of the event to synchronize the timing on. The default is to use the negative peak of the slow-wave.
- huestr
Grouping variable that will produce lines with different colors. Can be either ‘Channel’ or ‘Stage’.
- time_beforefloat
Time (in seconds) before
center.- time_afterfloat
Time (in seconds) after
center.- filttuple
Optional filtering to apply to data. For instance,
filt=(1, 30)will apply a 1 to 30 Hz bandpass filter, andfilt=(None, 40)will apply a 40 Hz lowpass filter. Filtering is done using default parameters in themne.filter.filter_datafunction.- maskarray_like or None
Custom boolean mask. Only the detected events for which mask is True will be plotted. Default is None, i.e. no masking (all events are included).
- figsizetuple
Figure size in inches.
- **kwargsdict
Optional argument that are passed to
seaborn.lineplot.