title: matplotlib power spectral density (PSD) value discrepancy
body: <p>I tried calculating the power spectral density using matplotlib function <code>psd()</code>. I plotted using two methods: </p>
  
  <ol>
  <li>At first I plot it directly using <code>plt.psd</code> (red line in plot)</li>
  <li>Then I output the values from <code>psd</code> to variables and plotting the
  variables (blue line in plot)</li>
  </ol>
  
  <p>The code I used:</p>
  
  <pre><code>power, freqs = plt.psd(P * 100000, len(P), Fs = 1 / dt, scale_by_freq=0)
  plt.psd(P * 100000, len(P), 1 / dt, scale_by_freq=0)
  plt.plot(freqs, power)
  </code></pre>
  
  <p>But the plots are different, I expected it to be coincident. From where does the discrepancy arise?</p>