title: How to add counts of points as a label in a sparse scatter plot
body: <p>I have sparse scatter plot to visualize the comparison of predicted vs actual values. The range of the values are 1-4 and there are no decimal points.</p>
  
  <p>I have tried <code>plotly</code> so far with hte following code (but I can also use a <strong><code>matplotlib</code></strong> solution):</p>
  
  <pre><code>my_scatter = go.Scatter(
      x = y_actual, y = y_pred, mode = 'markers', 
      marker = dict(color = 'rgb(240, 189, 89)', opacity=0.5)
  )   
  </code></pre>
  
  <p>This prints the graph nicely (see below). I use opacity to see the density at each point. I.e. if two points lie on top of each other, the point will be shown in darker color. However, this is not explanatory enough. Is it possible to add the counts at each point as a label? There are some overlaps at certain intersections. I want to display how many points intersects. Can this be done automatically using <strong>matplotlib</strong> or <strong>plotly</strong>?</p>
  
  <p><a href="https://i.stack.imgur.com/SiAuP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SiAuP.png" alt="enter image description here"></a></p>