title: Rescaling axis in Matplotlib imshow under unique function call
body: <p>I have written a function module that takes the argument of two variables. To plot, I had</p>
  
  <pre><code>x, y = pylab.ogrid[0.3:0.9:0.1, 0.:3.5:.5]
  z = np.zeros(shape=(np.shape(x)[0], np.shape(y)[1]))
  
  for i in range(len(x)):
      for j in range(len(y[0])):    
          z[i][j] = fancyFunction(x[i][0], y[0][j])
  
  pylab.imshow(z, interpolation="gaussian")
  </code></pre>
  
  <p>The image I get is the following:
  <img src="https://i.stack.imgur.com/Nbhxd.png" alt="enter image description here"></p>
  
  <p>But when I tried rescaling the x and y axis to match the ranges of [0.3:0.9:0.1, 0.:3.5:.5] thru <code>pylab.imshow(z, interpolation="gaussian", extent=[.3,.9,0.,3.5])</code> I get</p>
  
  <p><img src="https://i.stack.imgur.com/p80Gq.png" alt="enter image description here"></p>
  
  <p>I've been googling for hours but still couldn't find a way to make a square plot with differently scaled axis.</p>
  
  <p>Thanks!</p>