Skip to content

Commit bb96d8e

Browse files
committed
update aliasing of plot_spectrum
1 parent c2ba4da commit bb96d8e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fooof/plts/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
"""Plots sub-module for FOOOF."""
22

3-
from .spectra import plot_spectra
4-
from .spectra import plot_spectra as plot_spectrum
3+
from .spectra import plot_spectrum, plot_spectra

fooof/plts/spectra.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def plot_spectra(freqs, power_spectra, log_freqs=False, log_powers=False,
7777
style_spectrum_plot(ax, log_freqs, log_powers)
7878

7979

80+
# Alias `plot_spectrum` to `plot_spectra` for backwards compatibility
81+
plot_spectrum = plot_spectra
82+
83+
8084
@savefig
8185
@check_dependency(plt, 'matplotlib')
8286
def plot_spectra_shading(freqs, power_spectra, shades, shade_colors='r',

0 commit comments

Comments
 (0)