how to plot the FFT of a list of values

Dan Stromberg drsalists at gmail.com
Sat Dec 5 13:07:30 EST 2020


On Sat, Dec 5, 2020 at 9:20 AM Boris Dorestand <bdorestand at example.com>
wrote:

> I have 16 values of the period sequence 1, 2, 4, 8, 1, 2, 4, 8, ...  I
> compute its fourier transform using
>
> >>> from scipy import fft, ifft
> >>> x = [1,2,4,8,1,2,4,8]
> >>> fft(x)
> array([ 30. +0.j,   0. +0.j,  -6.+12.j,   0. +0.j, -10. +0.j,   0. +0.j,
>         -6.-12.j,   0. +0.j])
>
> Now how can I plot these values?  I would like to plot 16 values.  What
> do I need to do here?  Can you show an example?
>

Maybe
https://stackoverflow.com/questions/17445720/how-to-plot-complex-numbers-argand-diagram-using-matplotlib
?


More information about the Python-list mailing list