title: Matplotlib pick event from multiple series
body: <p>I am doing a scatterplot where I want to click on the individual points to do something.  This is like the existing example code.</p>
  
  <p><a href="https://matplotlib.org/examples/event_handling/pick_event_demo.html" rel="nofollow noreferrer">https://matplotlib.org/examples/event_handling/pick_event_demo.html</a></p>
  
  <p>I have implemented an on_pick method</p>
  
  <pre><code>def on_pick(event):
      ind = event.ind
      for i in ind:
          ...do something here with blue or red data...
  </code></pre>
  
  <p>However, I am stuck because I putting multiple series (red and blue) in the same plot</p>
  
  <pre><code>fig, ax = plt.subplots()
  ax.set_title('click on a point...')
  line, = ax.plot(red_xs, red_ys, 'o', picker=5, color='red') 
  line, = ax.plot(blue_xs, blue_ys, 'o', picker=5, color='blue')  
  </code></pre>
  
  <p>The event.ind is a collection of integers.  They are indexes into a series.  However, there seems to be no way to determine which series they are an index into.</p>
  
  <p>There must be a way to do this.  Does anyone know the trick?</p>
  
  <p>Thank you
  Peter</p>