This is intended--it is the way the "power spectrum" works, as opposed to the "power density spectrum". The former is what you get with scale_by_freq=False, the latter with True. It is illustrated in the second plot here: http://currents.soest.hawaii.edu/ocn_data_analysis/_static/Spectrum.html. As NFFT changes, the power spectrum preserves the height of a spectral peak from a single sinusoid, but not the level of a broad-bandwidth background. The reverse is true of the power spectral density.
I was expecting that. My point was actually the change in behavior wrt previous matplotlib versions that I did not find in the changelog and that ended up breaking backwards compatibility. Possibly I missed that.
Activity
efiring commented on Oct 8, 2016
This is intended--it is the way the "power spectrum" works, as opposed to the "power density spectrum". The former is what you get with scale_by_freq=False, the latter with True. It is illustrated in the second plot here: http://currents.soest.hawaii.edu/ocn_data_analysis/_static/Spectrum.html. As NFFT changes, the power spectrum preserves the height of a spectral peak from a single sinusoid, but not the level of a broad-bandwidth background. The reverse is true of the power spectral density.
See #4328 and #4593.
callegar commented on Oct 10, 2016
I was expecting that. My point was actually the change in behavior wrt previous matplotlib versions that I did not find in the changelog and that ended up breaking backwards compatibility. Possibly I missed that.
efiring commented on Oct 10, 2016
No, I think we missed it. It looks like it should be in http://matplotlib.org/api/api_changes.html, but isn't.
jklymak commented on Jan 28, 2023
This is really old history - closing...