title: Matplotlib Pyplot logo/image in Plot
body: <p>I'm struggling to achieve a simple goal in matplotlib... I want to put a small logo or indicator in the bottom right of my graph, without altering the axis or the real data that is being displayed. Here is my code now:</p>
  
  <pre><code>fig = plt.figure()
  plt.rcParams.update({'font.size': 15})
  
  img = plt.imread('./path/to/image.png')
  ax1 = fig.add_subplot(111)
  ax1.yaxis.tick_left()
  ax1.tick_params(axis='y', colors='black', labelsize=15)
  ax1.tick_params(axis='x', colors='black', labelsize=15)
  
  plt.grid(b=True, which='major', color='#D3D3D3', linestyle='-')
  
  plt.scatter([1,2,3,4,5],[5,4,3,2,1], alpha=1.0)
  
  plt.autoscale(enable=True, axis=u'both')
  
  fig.savefig('figure.png')
  </code></pre>
  
  <p>My output from this is below.</p>
  
  <p>This is now laying the photo over the whole graph -- I'd like it scaled to 20% of width &amp; height (if possible) and anchored to the bottom right. This also ruins my axis, because in this output I should be in the 0-100 range on both x &amp; y. Any ideas to solve this, the scaling is the big issue.</p>
  
  <p>Edit1: I've tried the solution below and linked questions here on SO. The problem is relying on the <code>extent</code> variable being passed to <code>imshow()</code> then doesn't work well when introducing new data. For example plotting a scatter plot coming from a data frame, could be from 0..1000 and 50..100 but using extent won't show the label or the position will be off. </p>
  
  <p>Edit2: There seems to be some progress with getting the figure length with <code>fig.get_size_inches()</code> and passing the variable to <code>extent</code>. Apparently all of matplotlib graph calculations are done through inches, so this may be a promising lead.</p>
  
  <p><img src="https://i.stack.imgur.com/TNwbA.png" alt="enter image description here"></p>