title: How to change pyplot.specgram x and y axis scaling?
body: <p>I have never worked with audio signals before and little do I know about signal processing. Nevertheless, I need to represent and audio signal using <code>pyplot.specgram</code> function from <strong>matplotlib</strong> library. Here is how I do it.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import scipy.io.wavfile as wavfile
  
  rate, frames = wavfile.read("song.wav")
  plt.specgram(frames)
  </code></pre>
  
  <p>The result I am getting is this nice spectrogram below:
  <a href="https://i.stack.imgur.com/yvaSP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yvaSP.png" alt="enter image description here"></a></p>
  
  <p>When I look at x-axis and y-axis which I suppose are <strong>frequency</strong> and <strong>time</strong> domains I can't get my head around the fact that frequency is scaled from <strong>0 to 1.0</strong> and time from <strong>0 to 80k</strong>. 
  What is the intuition behind it and, what's more important, how to represent it in a human friendly format such that frequency is 0 to 100k and time is in sec?</p>