title: Plotting power spectrum in python
body: <p>I have an array with 301 values, which were gathered from a movie clip with 301 frames. This means 1 value from 1 frame. The movie clip is running at 30 fps, so is in fact 10 sec long</p>
  
  <p>Now I would like to get the power spectrum of this "signal" ( with the right Axis). I tried:</p>
  
  <pre><code> X = fft(S_[:,2]);
   pl.plot(abs(X))
   pl.show()
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code> X = fft(S_[:,2]);
   pl.plot(abs(X)**2)
   pl.show()
  </code></pre>
  
  <p>Though I don't think this is the real spectrum.</p>
  
  <p>the signal:
  <img src="https://i.stack.imgur.com/MG8dz.jpg" alt="enter image description here"></p>
  
  <p>The spectrum: <img src="https://i.stack.imgur.com/VU17P.jpg" alt="enter image description here"></p>
  
  <p>The power spectrum :</p>
  
  <p><img src="https://i.stack.imgur.com/q8zQY.jpg" alt="enter image description here"></p>
  
  <p>Can anyone provide some help with this ? <strong>I would like to have a plot in Hz</strong>.</p>