title: How can I rescale the range of variables in a 2D plot?
body: <p>In python matplotlib, I would like to make a 2D color-plot of a function <code>z</code>  in terms of two variables <code>x</code> and <code>y</code>. The range of parameter <code>x</code> is much smaller than parameter <code>y</code> such that it is almost invisible which is which when I plot. I would like to keep the number of steps in each of <code>x</code> and <code>y</code> the same. How can I rescale the range of <code>x</code>? Following is part of my code in which I plot.</p>
  
  <pre><code>x1,y1,z1 = np.loadtxt("TDFD_Effectualness_etta_%s_%s.dat" % (waveform2, waveform1)).T #Transposed for easier unpacking
  
  nrows, ncols = final_step_j-1, final_step_k-1
  grid1 = z1.reshape((nrows, ncols))
  
  plt.xlabel('eta')
  plt.ylabel('M_chirp')
  
  plt.imshow(grid1, extent=(x1.min(), x1.max(), y1.min(), y1.max()), origin='lower', vmin=-5, vmax=5, 
          interpolation='nearest', 
          cmap=cm.gist_rainbow)
  fig1 = plt.gcf()
  fig1.suptitle('Effectualness_etta of %s and %s' % (waveform1, waveform2))
  plt.colorbar()
  plt.draw()
  fig1.savefig('/home/saeed/pycbc/test/plots/New_Effectualness_etta_%s_%s.pdf' % (waveform1, waveform2), dpi=100)
  
  plt.imshow(grid2, extent=(x2.min(), x2.max(), y2.min(), y2.max()), origin='lower', vmin=-5, vmax=5, 
          interpolation='nearest', 
          cmap=cm.gist_rainbow)
  
  close('all')
  </code></pre>