title: How to prevent images from overlapping in matplotlib
body: <p>I have the following code</p>
  <pre><code>def getImage(path):
      return OffsetImage(plt.imread(path), zoom=0.25)
  
  paths = dcmergedf['IMAGE_PATH']
  y = dcmergedf['PAB_FLUX']/dcmergedf['HA_FLUX']
  x = dcmergedf['HA_FLUX']/dcmergedf['HB_FLUX']
  
  fig, ax = plt.subplots(figsize=(15,15), tight_layout=True)
  ax.scatter(x, y) 
  for x0, y0, path in zip(x, y, paths):
      ab = AnnotationBbox(getImage(path), (x0, y0), frameon=False)
      ax.add_artist(ab)
  ax.axis([0.1,10,0.01,2])
  </code></pre>
  <p>which yields the following plot</p>
  <p><a href="https://i.stack.imgur.com/RkMoM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RkMoM.png" alt="plot" /></a></p>
  <p>Is there a clean way (not manually placing the images or changing the size) to get the images to spread/not overlap? They don't need to be exactly on the coordinates.</p>