My dataframe
df = pd.DataFrame({'date': ['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04', '2018-01-05'], 'b': ['a', 'a', 'b', 'b', 'c'], 'c': [1,2,3,4,5]})
date b c
0 2018-01-01 a 1
1 2018-01-02 a 2
2 2018-01-03 b 3
3 2018-01-04 b 4
4 2018-01-05 c 5
I want to plot a line graph where X is date
, y is c
and the color of the line changes based on b
. For this example there should be 3 different colors, the actual colors don't matter as long as their different.
I though this would work but it doesn't allow the change of color by column.
The output should be one line that changes color