Skip to content

Commit d4b27d1

Browse files
committed
update descriptions of plot_kwargs
1 parent 85a3fdb commit d4b27d1

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

fooof/plts/aperiodic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def plot_aperiodic_params(aps, colors=None, labels=None, ax=None, **plot_kwargs)
3333
ax : matplotlib.Axes, optional
3434
Figure axes upon which to plot.
3535
**plot_kwargs
36-
Keyword arguments to pass into the ``style_plot``.
36+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
3737
"""
3838

3939
ax = check_ax(ax, plot_kwargs.pop('figsize', PLT_FIGSIZES['params']))
@@ -83,7 +83,7 @@ def plot_aperiodic_fits(aps, freq_range, control_offset=False,
8383
ax : matplotlib.Axes, optional
8484
Figure axes upon which to plot.
8585
**plot_kwargs
86-
Keyword arguments to pass into the ``style_plot``.
86+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
8787
"""
8888

8989
ax = check_ax(ax, plot_kwargs.pop('figsize', PLT_FIGSIZES['params']))

fooof/plts/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def plot_spectral_error(freqs, error, shade=None, log_freqs=False, ax=None, **pl
3333
ax : matplotlib.Axes, optional
3434
Figure axes upon which to plot.
3535
**plot_kwargs
36-
Keyword arguments to pass into the ``style_plot``.
36+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
3737
"""
3838

3939
ax = check_ax(ax, plot_kwargs.pop('figsize', PLT_FIGSIZES['spectral']))

fooof/plts/fg.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def plot_fg(fg, save_fig=False, file_name=None, file_path=None, **plot_kwargs):
3333
Name to give the saved out file.
3434
file_path : Path or str, optional
3535
Path to directory to save to. If None, saves to current directory.
36+
**plot_kwargs
37+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
3638
3739
Raises
3840
------
@@ -76,7 +78,7 @@ def plot_fg_ap(fg, ax=None, **plot_kwargs):
7678
ax : matplotlib.Axes, optional
7779
Figure axes upon which to plot.
7880
**plot_kwargs
79-
Keyword arguments to pass into the ``style_plot``.
81+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
8082
"""
8183

8284
if fg.aperiodic_mode == 'knee':
@@ -101,7 +103,7 @@ def plot_fg_gf(fg, ax=None, **plot_kwargs):
101103
ax : matplotlib.Axes, optional
102104
Figure axes upon which to plot.
103105
**plot_kwargs
104-
Keyword arguments to pass into the ``style_plot``.
106+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
105107
"""
106108

107109
plot_scatter_2(fg.get_params('error'), 'Error',
@@ -121,7 +123,7 @@ def plot_fg_peak_cens(fg, ax=None, **plot_kwargs):
121123
ax : matplotlib.Axes, optional
122124
Figure axes upon which to plot.
123125
**plot_kwargs
124-
Keyword arguments to pass into the ``style_plot``.
126+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
125127
"""
126128

127129
plot_hist(fg.get_params('peak_params', 0)[:, 0], 'Center Frequency',

fooof/plts/fm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def plot_fm(fm, plot_peaks=None, plot_aperiodic=True, freqs=None, power_spectrum
6363
data_kwargs, model_kwargs, aperiodic_kwargs, peak_kwargs : None or dict, optional
6464
Keyword arguments to pass into the plot call for each plot element.
6565
**plot_kwargs
66-
Keyword arguments to pass into the ``style_plot``.
66+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
6767
6868
Notes
6969
-----
@@ -169,7 +169,7 @@ def _add_peaks_shade(fm, plt_log, ax, **plot_kwargs):
169169
ax : matplotlib.Axes
170170
Figure axes upon which to plot.
171171
**plot_kwargs
172-
Keyword arguments to pass into the ``fill_between``.
172+
Keyword arguments to pass into ``fill_between``.
173173
"""
174174

175175
defaults = {'color' : PLT_COLORS['periodic'], 'alpha' : 0.25}

fooof/plts/periodic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def plot_peak_params(peaks, freq_range=None, colors=None, labels=None, ax=None,
3535
ax : matplotlib.Axes, optional
3636
Figure axes upon which to plot.
3737
**plot_kwargs
38-
Keyword arguments to pass into the ``style_plot``.
38+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
3939
"""
4040

4141
ax = check_ax(ax, plot_kwargs.pop('figsize', PLT_FIGSIZES['params']))
@@ -86,7 +86,7 @@ def plot_peak_fits(peaks, freq_range=None, colors=None, labels=None, ax=None, **
8686
ax : matplotlib.Axes, optional
8787
Figure axes upon which to plot.
8888
**plot_kwargs
89-
Keyword arguments to pass into the plot call.
89+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
9090
"""
9191

9292
ax = check_ax(ax, plot_kwargs.pop('figsize', PLT_FIGSIZES['params']))

fooof/plts/spectra.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def plot_spectra(freqs, power_spectra, log_freqs=False, log_powers=False, freq_r
4747
ax : matplotlib.Axes, optional
4848
Figure axes upon which to plot.
4949
**plot_kwargs
50-
Additional plot related keyword arguments.
50+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
51+
For spectra plots, boolean input `grid` can be used to control if the figure has a grid.
5152
"""
5253

5354
# Create the plot & collect plot kwargs of interest
@@ -110,8 +111,9 @@ def plot_spectra_shading(freqs, power_spectra, shades, shade_colors='r',
110111
ax : matplotlib.Axes, optional
111112
Figure axes upon which to plot.
112113
**plot_kwargs
113-
Additional plot related keyword arguments.
114-
This can include additional inputs into :func:`~.plot_spectra`.
114+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
115+
For spectra plots, boolean input `grid` can be used to control if the figure has a grid.
116+
This can also include additional inputs into :func:`~.plot_spectra`.
115117
116118
Notes
117119
-----
@@ -166,7 +168,9 @@ def plot_spectra_yshade(freqs, power_spectra, shade='std', average='mean', scale
166168
ax : matplotlib.Axes, optional
167169
Figure axes upon which to plot.
168170
**plot_kwargs
169-
Additional plot related keyword arguments.
171+
Additional plot related keyword arguments, with styling options managed by ``style_plot``.
172+
For spectra plots, boolean input `grid` can be used to control if the figure has a grid.
173+
This can also include additional inputs into :func:`~.plot_spectra`.
170174
"""
171175

172176
if (isinstance(shade, str) or isfunction(shade)) and power_spectra.ndim != 2:

0 commit comments

Comments
 (0)