title: Add legend for different colors of fill_between() segments
body: <p>I am creating an &quot;event plot&quot; that is currently looking like this:</p>
  <p><a href="https://i.stack.imgur.com/sbNxs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sbNxs.png" alt="enter image description here" /></a></p>
  <p>However, I don't know how I can add a legend just for each color group. This is how the plot gets created at the moment:</p>
  <pre class="lang-py prettyprint-override"><code>handles = dict()
  
  for i, channel_events in enumerate(channel_event_list):
  
      for event in channel_events:
          start = event[0]
          end = event[1]
          y = (i, i + padding)
          
          c = 'red' if colors is None else colors[i]
  
          h = plt.fill_between([start, end], y[0], y2=y[1], color=c)
          
          if c not in handles:
              handles[c] = list()
          handles[c].append(h)
  </code></pre>
  <p>I thought that I can use the output of <code>fill_between()</code> as handles but it seems I was mistaken there.</p>
  <p>So what would be the easiest way to get a legend only for the colors here?</p>