2222###################################################################################################
2323
2424@check_dependency (plt , 'matplotlib' )
25- def save_report_fm (fm , file_name , file_path = None , plot_peaks = None , plot_aperiodic = True ,
26- plt_log = True , add_legend = True , data_kwargs = None , model_kwargs = None ,
27- aperiodic_kwargs = None , peak_kwargs = None ):
25+ def save_report_fm (fm , file_name , file_path = None , plt_log = True , ** plot_kwargs ):
2826 """Generate and save out a PDF report for a power spectrum model fit.
2927
3028 Parameters
@@ -35,17 +33,10 @@ def save_report_fm(fm, file_name, file_path=None, plot_peaks=None, plot_aperiodi
3533 Name to give the saved out file.
3634 file_path : str, optional
3735 Path to directory to save to. If None, saves to current directory.
38- plot_peaks : None or {'shade', 'dot', 'outline', 'line'}, optional
39- What kind of approach to take to plot peaks. If None, peaks are not specifically plotted.
40- Can also be a combination of approaches, separated by '-', for example: 'shade-line'.
41- plot_aperiodic : boolean, optional, default: True
42- Whether to plot the aperiodic component of the model fit.
4336 plt_log : bool, optional, default: False
4437 Whether or not to plot the frequency axis in log space.
45- add_legend : boolean, optional, default: False
46- Whether to add a legend describing the plot components.
47- data_kwargs, model_kwargs, aperiodic_kwargs, peak_kwargs : None or dict, optional
48- Keyword arguments to pass into the plot call for each plot element.
38+ plot_kwargs : keyword arguments
39+ Keyword arguments to pass into the plot method.
4940 """
5041
5142 # Set up outline figure, using gridspec
@@ -62,9 +53,7 @@ def save_report_fm(fm, file_name, file_path=None, plot_peaks=None, plot_aperiodi
6253
6354 # Second - data plot
6455 ax1 = plt .subplot (grid [1 ])
65- fm .plot (plot_peaks = plot_peaks , plot_aperiodic = plot_aperiodic , plt_log = plt_log , add_legend = add_legend ,
66- ax = ax1 , data_kwargs = data_kwargs , model_kwargs = model_kwargs , aperiodic_kwargs = aperiodic_kwargs ,
67- peak_kwargs = peak_kwargs )
56+ fm .plot (plt_log = plt_log , ax = ax1 , ** plot_kwargs )
6857
6958 # Third - FOOOF settings
7059 ax2 = plt .subplot (grid [2 ])
0 commit comments