title: Python Seaborn Matplotlib setting line style as legend
body: <p>I have the following plot build with seaborn using <code>factorplot()</code> method.</p>
  <p>Is it possible to use the line style as a legend to replace the legend based on line color on the right?  <a href="https://i.stack.imgur.com/8eQfP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8eQfP.png" alt="enter image description here" /></a></p>
  <pre><code>graycolors = sns.mpl_palette('Greys_r', 4)
  g = sns.factorplot(x=&quot;k&quot;, y=&quot;value&quot;, hue=&quot;class&quot;, palette=graycolors,
                     data=df, linestyles=[&quot;-&quot;, &quot;--&quot;])
  </code></pre>
  <p>Furthermore I'm trying to get both lines in black color using the <code>color=&quot;black&quot;</code> parameter in my factorplot method but this results in an exception &quot;factorplot() got an unexpected keyword argument 'color'&quot;. How can I paint both lines in the same color and separate them by the linestyle only?</p>