title: Make matplotlib colormap from numpy array
body: <p>I'm making a surface plot on matplotlib. My axes are x, y, and depth. I have a two dimensional array which has RGB values, and the index corresponds to the (x,y) coordinate. How can I make the colormap from this 2D array? Thanks.</p>
  
  <p>Code that makes numpy array:</p>
  
  <pre><code>import Image
  import numpy as np
  def makeImageArray(filename):
      img = Image.open(filename)
      a = np.array(img).astype("float32")
      return a
  </code></pre>
  
  <p>Image is in greyscale.</p>