title: Matplotlib heatmap: Image rotated when heatmap plot over it
body: <p>I am trying to plot a heatmap on top of an image.
  What I did:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  import numpy.random
  import urllib
  #downloading an example image
  urllib.urlretrieve("http://tekeye.biz/wp-content/uploads/2013/01/small_playing_cards.png", "/tmp/cards.png")
  #reading and plotting the image
  im = plt.imread('/tmp/cards.png')
  implot = plt.imshow(im)
  #generating random data for the histogram
  x=numpy.random.normal(500, 100, size=1000)
  y=numpy.random.normal(100, 50, size=1000)
  heatmap, xedges, yedges = np.histogram2d(x, y, bins=50)
  extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
  plt.imshow(heatmap, extent=extent,alpha=.5)
  plt.show()
  </code></pre>
  
  <p>When I plot them together, the image get's rotated, up-side down as in:</p>
  
  <p><img src="https://i.stack.imgur.com/lUFNC.png" alt="enter image description here"></p>
  
  <p>Does anyone have a solution for having the old picture back?</p>