title: Matplotlib make image Stretchable by mouse event
body: <p>How Can i make this image stretchable using mouse event in matplotlib. please help.</p>
  
  <p>Here the code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.image as image
  from matplotlib.offsetbox import OffsetImage, AnnotationBbox
  
  fig = plt.figure()
  
  X = [1, 2, 3, 4, 5, 6, 7]
  Y = [1, 3, 4, 2, 5, 8, 6]
  
  mainaxes = fig.add_axes([0.1, 0.1, 0.8, 0.8]) # main axes
  
  img = image.imread('https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png')
  z = 0.3 + 0.3
  imagebox = OffsetImage(img, zoom=z)
  imgbox = AnnotationBbox(imagebox, (0.3,0.5), frameon=True)
  mainaxes.add_artist(imgbox)
  
  imgbox.draggable()
  
  plt.show()
  </code></pre>