title: Plotting a cropped background image on a matplotlib graph
body: <p>I'm trying to plot a simple line plot and insert a background image to a plot.</p>
  
  <p>An example pic (with cat.jpg and dog.jpd):</p>
  
  <p><a href="https://i.stack.imgur.com/5AmzS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5AmzS.png" alt="I have two background images, I&#39;d like to use; cat.jpg and dog.jpg"></a></p>
  
  <p>At the moment I have a code that plots the line (from a pandas dataframe) and places the images into figure. However the images and the line plot do not 'interact' at all.</p>
  
  <pre><code>fig, ax = plt.subplots(figsize=(15,10))
  cat = np.array(Image.open('cat.jpg'))
  dog = np.array(Image.open('dog.jpg'))
  ax.imshow(cat, extent=[0, 10, 0, 18], aspect='auto',   cmap='gray',alpha=0.75)
  ax.imshow(dog, extent=[10, 20, 0, 18], aspect='auto', cmap='gray',alpha=0.75)
  
  ax.plot(df['Series'],color='#3cb8fb',alpha=0.95,linewidth=3.0)
  
  plt.show()
  </code></pre>