fooof.plts.fm.plot_fm

fooof.plts.fm.plot_fm(fm, plot_peaks=None, plot_aperiodic=True, plt_log=False, add_legend=True, save_fig=False, file_name=None, file_path=None, ax=None, plot_style=<function style_spectrum_plot at 0x7fd2f7300710>, data_kwargs=None, model_kwargs=None, aperiodic_kwargs=None, peak_kwargs=None)[source]

Plot the power spectrum and model fit results from a FOOOF object.

Parameters
fmFOOOF

Object containing a power spectrum and (optionally) results from fitting.

plot_peaksNone or {‘shade’, ‘dot’, ‘outline’, ‘line’}, optional

What kind of approach to take to plot peaks. If None, peaks are not specifically plotted. Can also be a combination of approaches, separated by ‘-‘, for example: ‘shade-line’.

plot_aperiodicboolean, optional, default: True

Whether to plot the aperiodic component of the model fit.

plt_logboolean, optional, default: False

Whether to plot the frequency values in log10 spacing.

add_legendboolean, optional, default: False

Whether to add a legend describing the plot components.

save_figbool, optional, default: False

Whether to save out a copy of the plot.

file_namestr, optional

Name to give the saved out file.

file_pathstr, optional

Path to directory to save to. If None, saves to current directory.

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.

data_kwargs, model_kwargs, aperiodic_kwargs, peak_kwargsNone or dict, optional

Keyword arguments to pass into the plot call for each plot element.

Notes

Since FOOOF objects store power values in log spacing, the y-axis (power) is plotted in log spacing by default.