title: Manually change color in legend of pyplot
body: <p>I'm having a problem very similar to this one:</p>
  
  <p><a href="https://stackoverflow.com/questions/23698850/manually-set-color-of-points-in-legend">Manually set color of points in legend</a></p>
  
  <p>Namely, I want to manually change the color of the markers that are displayed in the legend. The only difference to the above linked example is, I use <code>plt.plot</code> (no line visible, just the data points) instead of <code>plt.scatter</code>. 
  The suggested solution was:   </p>
  
  <pre><code>ax = plt.gca()
  leg = ax.get_legend()
  leg.legendHandles[0].set_color('yellow')
  leg.legendHandles[1].set_color('black')
  </code></pre>
  
  <p>This, however, doesn't do it for me, since the symbols don't seem to be considered part of the line, I guess. <code>set_markeredgecolor</code> and <code>set_markerfacecolor</code> don't do anything either, and since <code>set_marker</code> just adds additional markers in the legend, I assume that the symbols aren't considered as markers as well. None of the above (safe from <code>set_marker</code>) raise an error or a warning, they just don't do anything.</p>
  
  <p>Say my code was:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  x1 = np.random.random(10)
  y1 = np.random.random(10)
  x2 = np.random.random(10)
  y2 = np.random.random(10)
  
  symbolsdic = {0: 'o', 1: '^', 2: 's', 3: '*', 4: 'D', 5: '+', 6: '8', 7: 'd', 8: 'H', 9: 'v'}
  
  for i in range(10):
      plt.plot(x1[i], y1[i], symbolsdic[i], label=str(i), color='red')
      plt.plot(x2[i], y2[i], symbolsdic[i], color='blue')    
  
  plt.legend()
  
  plt.show()
  </code></pre>
  
  <p>Now I want the symbols in the legend to be all black. What do I do?</p>