title: Matplotlib: Color-coded text in legend instead of a line
body: <p>On certain LCD monitors, the color of the horizontal lines in the legend is hard to tell apart.  (See the image attached).  So instead of drawing a line in the legend, is it possible to just color code the text itself?  so another words, have "y=0x" in blue, "y=1x" in green, etc...</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  x = np.arange(10)
  
  fig = plt.figure()
  ax = plt.subplot(111)
  
  for i in xrange(5):
      ax.plot(x, i * x, label='$y = %ix$' % i)
  
  ax.legend()
  
  plt.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/AGZ70.png" alt="enter image description here"></p>
  
  <p>PS. if the line could be made thicker just in the legend, but not in the plot, this would also work.</p>