title: Some confusion over Numpy + Scipy + matplotlib Spectrum Analyzer code
body: <p>I've been attempting to understand the code at the bottom of <a href="http://www.frank-zalkow.de/en/code-snippets/create-audio-spectrograms-with-python.html" rel="nofollow">http://www.frank-zalkow.de/en/code-snippets/create-audio-spectrograms-with-python.html</a>, though sadly I haven't been getting anywhere with it. I don't think I'm expected to understand most of the code, as I have limited experience with FFTs, but unfortunately I'm also having trouble understanding how the graph is generated. I'm also getting very limited progress from a trial-and-error approach, due to the fact that my computer lags heavily and because of the relatively long time it takes for a graph to be generated.</p>
  
  <p>With that being said, I need a way to scale the graph so that it only displays values up to 5000 Hz, though still on a logarithmic scale. I'd also like to understand how the wav file is sampled, and what values I can edit in order to take more samples per second. Can somebody explain how both of these points work, and how I can edit the code in order to fulfill these requirements?</p>