2222
2323@check_dependency (plt , 'matplotlib' )
2424def plot_spectrum (freqs , power_spectrum , log_freqs = False , log_powers = False ,
25- ax = None , style_plot = style_spectrum_plot , ** kwargs ):
25+ ax = None , plot_style = style_spectrum_plot , ** kwargs ):
2626 """Plot a power spectrum.
2727
2828 Parameters
@@ -37,7 +37,7 @@ def plot_spectrum(freqs, power_spectrum, log_freqs=False, log_powers=False,
3737 Whether or not to take the log of the power axis before plotting.
3838 ax : matplotlib.Axes, optional
3939 Figure axes upon which to plot.
40- style_plot : callable, optional, default: style_spectrum_plot
40+ plot_style : callable, optional, default: style_spectrum_plot
4141 A function to call to apply styling & aesthetics to the plot.
4242 **kwargs
4343 Keyword arguments to be passed to the plot call.
@@ -57,12 +57,12 @@ def plot_spectrum(freqs, power_spectrum, log_freqs=False, log_powers=False,
5757
5858 # Create the plot & style
5959 ax .plot (plt_freqs , plt_powers , ** kwargs )
60- check_n_style (style_plot , ax , log_freqs , log_powers )
60+ check_n_style (plot_style , ax , log_freqs , log_powers )
6161
6262
6363@check_dependency (plt , 'matplotlib' )
6464def plot_spectra (freqs , power_spectra , log_freqs = False , log_powers = False , labels = None ,
65- ax = None , style_plot = style_spectrum_plot , ** kwargs ):
65+ ax = None , plot_style = style_spectrum_plot , ** kwargs ):
6666 """Plot multiple power spectra on the same plot.
6767
6868 Parameters
@@ -78,7 +78,7 @@ def plot_spectra(freqs, power_spectra, log_freqs=False, log_powers=False, labels
7878 labels " "
7979 ax : matplotlib.Axes, optional
8080 Figure axes upon which to plot.
81- style_plot : callable, optional, default: style_spectrum_plot
81+ plot_style : callable, optional, default: style_spectrum_plot
8282 A function to call to apply styling & aesthetics to the plot.
8383 **kwargs
8484 Keyword arguments to be passed to the plot call.
@@ -90,13 +90,13 @@ def plot_spectra(freqs, power_spectra, log_freqs=False, log_powers=False, labels
9090 ax = check_ax (ax )
9191 for freq , power_spectrum , label in zip (freqs , power_spectra , labels ):
9292 plot_spectrum (freq , power_spectrum , log_freqs , log_powers , label = label ,
93- style_plot = None , ax = ax , ** kwargs )
94- check_n_style (style_plot , ax , log_freqs , log_powers )
93+ plot_style = None , ax = ax , ** kwargs )
94+ check_n_style (plot_style , ax , log_freqs , log_powers )
9595
9696
9797@check_dependency (plt , 'matplotlib' )
9898def plot_spectrum_shading (freqs , power_spectrum , shades , add_center = False ,
99- ax = None , style_plot = style_spectrum_plot , ** kwargs ):
99+ ax = None , plot_style = style_spectrum_plot , ** kwargs ):
100100 """Plot a power spectrum with a shaded frequency region (or regions).
101101
102102 Parameters
@@ -111,21 +111,21 @@ def plot_spectrum_shading(freqs, power_spectrum, shades, add_center=False,
111111 Whether to add a line at the center point of the shaded regions.
112112 ax : matplotlib.Axes, optional
113113 Figure axes upon which to plot.
114- style_plot : callable, optional, default: style_spectrum_plot
114+ plot_style : callable, optional, default: style_spectrum_plot
115115 A function to call to apply styling & aesthetics to the plot.
116116 **kwargs
117117 Keyword arguments to be passed to the plot call.
118118 """
119119
120120 ax = check_ax (ax )
121- plot_spectrum (freqs , power_spectrum , style_plot = None , ax = ax , ** kwargs )
121+ plot_spectrum (freqs , power_spectrum , plot_style = None , ax = ax , ** kwargs )
122122 add_shades (ax , shades , add_center , kwargs .get ('log_freqs' , False ))
123- check_n_style (style_plot , ax , kwargs .get ('log_freqs' , False ), kwargs .get ('log_powers' , False ))
123+ check_n_style (plot_style , ax , kwargs .get ('log_freqs' , False ), kwargs .get ('log_powers' , False ))
124124
125125
126126@check_dependency (plt , 'matplotlib' )
127127def plot_spectra_shading (freqs , power_spectra , shades , add_center = False ,
128- ax = None , style_plot = style_spectrum_plot , ** kwargs ):
128+ ax = None , plot_style = style_spectrum_plot , ** kwargs ):
129129 """Plot a group of power spectra with a shaded frequency region (or regions).
130130
131131 Parameters
@@ -140,7 +140,7 @@ def plot_spectra_shading(freqs, power_spectra, shades, add_center=False,
140140 Whether to add a line at the center point of the shaded regions.
141141 ax : matplotlib.Axes, optional
142142 Figure axes upon which to plot.
143- style_plot : callable, optional, default: style_spectrum_plot
143+ plot_style : callable, optional, default: style_spectrum_plot
144144 A function to call to apply styling & aesthetics to the plot.
145145 **kwargs
146146 Keyword arguments to be passed to plot_spectra or the plot call.
@@ -152,6 +152,6 @@ def plot_spectra_shading(freqs, power_spectra, shades, add_center=False,
152152 """
153153
154154 ax = check_ax (ax )
155- plot_spectra (freqs , power_spectra , ax = ax , style_plot = None , ** kwargs )
155+ plot_spectra (freqs , power_spectra , ax = ax , plot_style = None , ** kwargs )
156156 add_shades (ax , shades , add_center , kwargs .get ('log_freqs' , False ))
157- check_n_style (style_plot , ax , kwargs .get ('log_freqs' , False ), kwargs .get ('log_powers' , False ))
157+ check_n_style (plot_style , ax , kwargs .get ('log_freqs' , False ), kwargs .get ('log_powers' , False ))
0 commit comments