fooof.plts.spectra.plot_spectrum_shading

fooof.plts.spectra.plot_spectrum_shading(freqs, power_spectrum, shades, shade_colors='r', add_center=False, ax=None, plot_style=<function style_spectrum_plot at 0x7fd2f7300710>, **plot_kwargs)[source]

Plot a power spectrum with a shaded frequency region (or regions).

Parameters
freqs1d array

Frequency values, to be plotted on the x-axis.

power_spectrum1d array

Power values, to be plotted on the y-axis.

shadeslist of [float, float] or list of list of [float, float]

Shaded region(s) to add to plot, defined as [lower_bound, upper_bound].

shade_colorsstr or list of string

Color(s) to plot shades.

add_centerbool, optional, default: False

Whether to add a line at the center point of the shaded regions.

axmatplotlib.Axes, optional

Figure axes upon which to plot.

plot_stylecallable, optional, default: style_spectrum_plot

A function to call to apply styling & aesthetics to the plot.

**plot_kwargs

Keyword arguments to be passed to the plot call.

Examples using fooof.plts.spectra.plot_spectrum_shading