title: Matplotlib 2D graph with interpolation
body: <p>I'm trying to create a plot to show a temperature gradient over a level surface. I am able to get the colors down but it is not interpolating the way I need it to. <a href="https://stackoverflow.com/questions/9008370/python-2d-contour-plot-from-3-lists-x-y-and-rho">This question</a> was helpful in creating the plot. It seems as if the points aren't weighted equally when the plot is produced. <a href="https://docs.google.com/drawings/d/1z2k97YBPambfxlc060W6RDI9fKoFj-8KvhGQJDzUMgw/edit" rel="nofollow noreferrer">This</a> is how the graph currently looks. It should look like the color bar, since to top two points are 23.7 and the bottom two points are 23.4. The code I used is:
      <img src="https://i.stack.imgur.com/PsIt5.png" alt="enter image description here"></p>
  
  <pre><code>   xi, yi = np.linspace(xm, xM, 500), np.linspace(ym, yM, 500)
     xi, yi = np.meshgrid(xi, yi)
     xo=[0, 0, 2, 2]
     yo=[0, 2, 0, 2]
     ao=[23.4, 23.7, 23.4, 23.7]
     rbf = scipy.interpolate.Rbf(xo, yo, ao, function='linear')
     ai = rbf(xi, yi)
  
     plt.xlabel('X')
     plt.ylabel('Y')
  
     plt.imshow(ai, vmin=am, vmax=aM, origin='lower', extent=[xm, xM, ym, yM])
  
     plt.scatter(xo, yo, c=ao)
     plt.colorbar()
     plt.show()
  </code></pre>