title: seaborn or matplotlib line chart, line color depending on variable
body: <p>I have a pandas dataframe with three columns, <code>Date</code>(timestamp), <code>Color</code>('red' or 'blue') and <code>Value</code>(int).</p>
  
  <p>I am currently getting a line chart from it with the following code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  Dates=['01/01/2014','02/01/2014','03/01/2014','04/01/2014','05/01/2014','06/01/2014','07/01/2014']
  Values=[3,4,6,5,4,5,4]
  Colors=['red','red','blue','blue','blue','red','red']
  df=pd.DataFrame({'Dates':Dates,'Values':Values,'Colors':Colors})
  df['Dates']=pd.to_datetime(df['Dates'],dayfirst=True)
  
  grouped = df.groupby('Colors')
  fig, ax = plt.subplots()
  
  for key, group in grouped:
     group.plot(ax=ax, x="Dates", y="Values", label=key, color=key)
  
  plt.show()
  </code></pre>
  
  <p>I'd like the line color to depend on the 'color' columns. How can I achieve that?</p>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/26139423">here</a> a similar question for scatterplots, but it doesn't seem I can apply the same solution to a time series line chart.</p>
  
  <p>My output is currently this:</p>
  
  <p><a href="https://i.stack.imgur.com/rZ9LS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rZ9LS.png" alt="enter image description here"></a></p>
  
  <p>I am trying to achieve something like this (one line only, but several colors)</p>
  
  <p><a href="https://i.stack.imgur.com/IFR28.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IFR28.png" alt="enter image description here"></a></p>