yasa.SpindlesResults.plot_average#

SpindlesResults.plot_average(center='Peak', hue='Channel', time_before=1, time_after=1, filt=(None, None), mask=None, figsize=(6, 4.5), **kwargs)[source]#

Plot the average spindle.

Parameters:
centerstr

Landmark of the event to synchronize the timing on. Default is to use the most prominent peak of the spindle.

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=(12, 16) will apply a 12 to 16 Hz bandpass filter, and filt=(None, 40) will apply a 40 Hz lowpass filter. Filtering is done using the default parameters in the mne.filter.filter_data function.

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.