title: Create NonUniformImage based on Numpy 2d array with custom cell width and height
body: <p>I'm trying to make a "heatmap" with Matplotlib of a 2d Numpy Array and found the NonUniformImage option <a href="https://matplotlib.org/1.3.1/examples/pylab_examples/image_nonuniform.html" rel="nofollow noreferrer">here</a>. Below is a simple single version. Unfortunately I'm not able to change the x without changing the y. The error that pyhton Propmpts is: <code>Axes don't match array shape</code></p>
  
  <h2>Reproducible Example</h2>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from matplotlib.image import NonUniformImage
  from matplotlib import cm
  
  x = np.arange(6)
  y = np.arange(6)
  z = x[:, np.newaxis].dot(y[:, np.newaxis].transpose())
  
  fig, ax = plt.subplots()
  im = NonUniformImage(ax, interpolation='nearest', extent=(0, len(x)-1, 0, len(y)-1))
  im.set_data(x, y, z)
  ax.images.append(im)
  ax.set_xlim(0, len(x)-1)
  ax.set_ylim(0, len(y)-1)
  </code></pre>
  
  <p>My goal is to plot a map based on a Numpy 2d array with 'custom Grid cells'. That means that I can assign x and y with irregular series (e.g. <code>np.array([0.5,3,8,15,15.4])</code>. I know the x and y that are assign represent the center of a cell so the last thing I would like to solve is that the plot is completely visible (if that is possible).</p>
  
  <p>How can I make a image that has a different constraint (not square), with custom width and height depending on two lists?</p>