Hello all,
I'm sorry if this has been treated before, but I haven't found
anything when searching the archives or the net.
Basically, the problem surfaces when plotting FFT spectras using many
data points. The amplitudes of the peaks in the spectra then seem to
depend on the size of the plot window.
Example code:
from pylab import *
t=arange(65536)
plot(abs(fft(sin(2*pi*.01*t)*blackman(len(t)))))
[<matplotlib.lines.Line2D object at 0x03871990>]
show()
With the original window size (WXAgg backend), I get maximum peaks at
about 390. Zooming in on the peak will increase the amplitude.
Resizing the window can also make the amplitude increase.
The expected amplitude is:
max(abs(fft(sin(2*pi*.01*t)*blackman(len(t)))))
12891.96683092583
Is this a known problem, or should I file a bug report? Is there any
workaround (except decreasing the length of t, and thus the level of
detail)?
I'm using ActivePython 2.6.3.7 for windows, matplotlib 0.99.1 binary,
numpy 1.3.0 and wxPython-unicode-2.8.10.1. I've also tried with the
TkAgg backend, which gives similar results.
Thanks,
Henrik