From 51651d36b650d575c66d47be4e1f8e24bfc05859 Mon Sep 17 00:00:00 2001 From: ryanhammonds Date: Mon, 12 Apr 2021 12:22:49 -0700 Subject: [PATCH] tutorial updates --- examples/analyses/plot_mne_example.py | 9 +++++---- examples/plots/plot_power_spectra.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/analyses/plot_mne_example.py b/examples/analyses/plot_mne_example.py index 17ea559d..1e46dafb 100644 --- a/examples/analyses/plot_mne_example.py +++ b/examples/analyses/plot_mne_example.py @@ -284,10 +284,11 @@ def check_nans(data, nan_policy='zero'): # Compare the power spectra between low and high exponent channels fig, ax = plt.subplots(figsize=(8, 6)) -plot_spectra(fg.freqs, fg.get_fooof(np.argmin(exps)).power_spectrum, - ax=ax, label='Low Exponent') -plot_spectra(fg.freqs, fg.get_fooof(np.argmax(exps)).power_spectrum, - ax=ax, label='High Exponent') + +spectra = [fg.get_fooof(np.argmin(exps)).power_spectrum, + fg.get_fooof(np.argmax(exps)).power_spectrum] + +plot_spectra(fg.freqs, spectra, ax=ax, labels=['Low Exponent', 'High Exponent']) ################################################################################################### # Conclusion diff --git a/examples/plots/plot_power_spectra.py b/examples/plots/plot_power_spectra.py index df2bf30e..abc8945b 100644 --- a/examples/plots/plot_power_spectra.py +++ b/examples/plots/plot_power_spectra.py @@ -157,5 +157,5 @@ plot_spectra_shading(freqs_al, powers_al, [8, 12], log_powers=True, alpha=0.6, ax=ax) plot_spectra(freqs_al10, powers_al10, log_powers=True, - color='black', linewidth=3, label='10 Hz Alpha', ax=ax) + color='black', linewidth=3, label='10 Hz Alpha', ax=ax) plt.title('Comparing Alphas', {'fontsize' : 20, 'fontweight' : 'bold'});