title: Colored label texts in a matplotlib stem plot
body: <p>I like do a stem-plit with Pythons <code>matplotlib</code> where the figure has a legend box where the labels are colored like the stems. At the moment I only get a legend where the label text is the normal black and has a short stem plot on the left. I would like it to be only the label text but that one colored like the corresponding stems (e.g. blue and green in the example below).</p>
  
  <p>Note that the actual stem plot is part of a figure with multiple subplots, so I would like the solution to use the <code>ax</code> handler instead of <code>plt</code>, if possible.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  n = np.arange(0, 10)
  
  x1 = np.sin(n)
  x2 = np.cos(n)
  
  fig, ax = plt.subplots()
  
  ax.stem(n, x1, 'b', markerfmt='bo', label="First")
  ax.stem(n, x2, 'g', markerfmt='go', label="Second")
  ax.legend()
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/oAfcm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oAfcm.png" alt="enter image description here"></a></p>
  
  <p>In short the legend box should only contain "First" in blue and "Second" in green without any lines or dots.</p>