title: How do I plot a spectrogram the same way that pylab's specgram() does?
body: <p>In Pylab, the <code>specgram()</code> function creates a spectrogram for a given list of amplitudes and automatically creates a window for the spectrogram.</p>
  
  <p>I would like to generate the spectrogram (instantaneous power is given by <code>Pxx</code>), modify it by running an edge detector on it, and then plot the result.</p>
  
  <pre><code>(Pxx, freqs, bins, im) = pylab.specgram( self.data, Fs=self.rate, ...... )
  </code></pre>
  
  <p>The problem is that whenever I try to plot the modified <code>Pxx</code> using <code>imshow</code> or even <code>NonUniformImage</code>, I run into the error message below.</p>
  
  <blockquote>
    <p>/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/image.py:336: UserWarning: Images are not supported on non-linear axes.
      warnings.warn("Images are not supported on non-linear axes.")</p>
  </blockquote>
  
  <p>For example, a part of the code I'm working on right is below.</p>
  
  <pre><code>    # how many instantaneous spectra did we calculate
      (numBins, numSpectra) = Pxx.shape
  
      # how many seconds in entire audio recording
      numSeconds = float(self.data.size) / self.rate
  
  
      ax = fig.add_subplot(212)
      im = NonUniformImage(ax, interpolation='bilinear')
  
      x = np.arange(0, numSpectra)
      y = np.arange(0, numBins)
      z = Pxx
      im.set_data(x, y, z)
      ax.images.append(im) 
      ax.set_xlim(0, numSpectra)
      ax.set_ylim(0, numBins)
      ax.set_yscale('symlog') # see http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.set_yscale
      ax.set_title('Spectrogram 2')
  </code></pre>
  
  <h2>Actual Question</h2>
  
  <p>How do you plot image-like data with a logarithmic y axis with matplotlib/pylab?</p>