code: def image_click_xshift(axes = "gca"):
      
      if axes == "gca": axes = _pylab.gca()
  
      try:
          p1 = _pylab.ginput()
          p2 = _pylab.ginput()
  
          xshift = p2[0][0]-p1[0][0]
  
          e = axes.images[0].get_extent()
  
          e[0] = e[0] + xshift
          e[1] = e[1] + xshift
  
          axes.images[0].set_extent(e)
  
          _pylab.draw()
      except:
          print("whoops")
docs: Takes a starting and ending point, then shifts the image y by this amount