def legc(leg,col='color'):
    """Color legend text to match linecolor.

    :Inputs:
      'leg' is a legend object.

      'col' sets the field of the leg.get_lines() objects to use to find
          the color.

    You may need to refresh the figure to see the changes."""
    # 2009-12-14 09:50 IJC: Created

    texts = leg.get_texts()
    lines = leg.get_lines()
    for label,line in zip(texts,lines):
        label.set_color(line.get_color())
    return leg