Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 51651d3

Browse files
committed
tutorial updates
1 parent ffb9d52 commit 51651d3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/analyses/plot_mne_example.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,11 @@ def check_nans(data, nan_policy='zero'):
284284

285285
# Compare the power spectra between low and high exponent channels
286286
fig, ax = plt.subplots(figsize=(8, 6))
287-
plot_spectra(fg.freqs, fg.get_fooof(np.argmin(exps)).power_spectrum,
288-
ax=ax, label='Low Exponent')
289-
plot_spectra(fg.freqs, fg.get_fooof(np.argmax(exps)).power_spectrum,
290-
ax=ax, label='High Exponent')
287+
288+
spectra = [fg.get_fooof(np.argmin(exps)).power_spectrum,
289+
fg.get_fooof(np.argmax(exps)).power_spectrum]
290+
291+
plot_spectra(fg.freqs, spectra, ax=ax, labels=['Low Exponent', 'High Exponent'])
291292

292293
###################################################################################################
293294
# Conclusion

examples/plots/plot_power_spectra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,5 @@
157157
plot_spectra_shading(freqs_al, powers_al, [8, 12],
158158
log_powers=True, alpha=0.6, ax=ax)
159159
plot_spectra(freqs_al10, powers_al10, log_powers=True,
160-
color='black', linewidth=3, label='10 Hz Alpha', ax=ax)
160+
color='black', linewidth=3, label='10 Hz Alpha', ax=ax)
161161
plt.title('Comparing Alphas', {'fontsize' : 20, 'fontweight' : 'bold'});

0 commit comments

Comments
 (0)