fooof
fooof copied to clipboard
Bug report: tutorial about Example Power Spectra and Models
When I follow the tutorial in following website: https://fooof-tools.github.io/fooof/auto_tutorials/plot_01-ModelDescription.html#sphx-glr-auto-tutorials-plot-01-modeldescription-py
fm1 = FOOOF(min_peak_height=0.05, verbose=False) fm2 = FOOOF(min_peak_height=0.05, aperiodic_mode='knee', verbose=False) fm1.fit(freqs1, powers1) fm2.fit(freqs2, powers2)
Plot one of the example power spectra
plot_spectra(freqs1, powers1, log_powers=False, color='black') I found the warning about this ValueError: x and y must have same first dimension, but have shapes (75,) and (1,)
But the data structure is true, and I can plot the PSD in the plt.plot from matplotlib toolbox... So I want to know why this warning is happen...
Hey @MrCCecho - are you on fooof v1.0 by any chance? I think what might be happening is that the documentation website has been updated for version 1.1, which included some updates to plotting that are leading to the issue you are experiencing. This should be fixed by updating to fooof version 1.1 (if you are on a terminal pip install -U fooof
should work to update, for example)
As far as I can tell, this issue is about the documentation site reflecting v1.1, which is slightly different if you are running 1.0. If anyone else encounters a similar issue here, you are recommended to update to v1.1. Otherwise, since I don't think there is an action item here, I am going to close this issue - but if @MrCCecho or anyone else has any follow up, feel free to add a comment, etc!