title: Putting a small image on the corner of a plot with matplotlib
body: <p>This question lend code from Joe Kington(<a href="https://stackoverflow.com/questions/3609585/how-to-insert-a-small-image-on-the-corner-of-a-plot-with-matplotlib">how to insert a small image on the corner of a plot with matplotlib?</a>):</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import Image
  import numpy as np
  
  im = Image.open('/home/jofer/logo.png')
  height = im.size[1]
  
  # We need a float array between 0-1, rather than
  # a uint8 array between 0-255
  im = np.array(im).astype(np.float) / 255
  
  fig = plt.figure()
  
  plt.plot(np.arange(10), 4 * np.arange(10))
  
  # With newer (1.0) versions of matplotlib, you can 
  # use the "zorder" kwarg to make the image overlay
  # the plot, rather than hide behind it... (e.g. zorder=10)
  fig.figimage(im, 0, fig.bbox.ymax - height)
  
  # (Saving with the same dpi as the screen default to
  #  avoid displacing the logo image)
  fig.savefig('/home/jofer/temp.png', dpi=80)
  
  plt.show()
  </code></pre>
  
  <p>I tried the following:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import Image
  import numpy as np
  
  im = Image.open('/home/po/pic.jpg')
  height = im.size[1]
  
  im = np.array(im).astype(np.float) / 255
  
  fig = plt.figure()
  fig.subplots_adjust(top=0.80)
  fig.patch.set_facecolor('black')
  ax1 = fig.add_subplot(1, 1, 1, axisbg='white')
  
  fig.figimage(im, 0, fig.bbox.ymax - height)
  </code></pre>
  
  <p>But my image is at the center rather than at the middle, is there a way to shift it up, i have tried read up on <a href="http://effbot.org/imagingbook/image.htm" rel="nofollow noreferrer">http://effbot.org/imagingbook/image.htm</a> but to no avail</p>
  
  <p>Thanks in advance:)</p>