fooof.plts.spectra.plot_spectra_yshade¶
- fooof.plts.spectra.plot_spectra_yshade(freqs, power_spectra, shade='std', average='mean', scale=1, log_freqs=False, log_powers=False, color=None, label=None, ax=None, **plot_kwargs)[source]¶
Plot standard deviation or error as a shaded region around the mean spectrum.
- Parameters
- freqs1d array
Frequency values, to be plotted on the x-axis.
- power_spectra1d or 2d array
Power values, to be plotted on the y-axis.
shade
must be provided if 1d.- shade‘std’, ‘sem’, 1d array or callable, optional, default: ‘std’
Approach for shading above/below the mean spectrum.
- average‘mean’, ‘median’ or callable, optional, default: ‘mean’
Averaging approach for the average spectrum to plot. Only used if power_spectra is 2d.
- scaleint, optional, default: 1
Factor to multiply the plotted shade by.
- log_freqsbool, optional, default: False
Whether to plot the frequency axis in log spacing.
- log_powersbool, optional, default: False
Whether to plot the power axis in log spacing.
- colorstr, optional, default: None
Line color of the spectrum.
- labelstr, optional, default: None
Legend label for the spectrum.
- axmatplotlib.Axes, optional
Figure axes upon which to plot.
- **plot_kwargs
Additional plot related keyword arguments, with styling options managed by
style_plot
. For spectra plots, boolean input grid can be used to control if the figure has a grid. This can also include additional inputs intoplot_spectra()
.