I'm trying to plot a Scatter plot of Counts and Dates within a dataframe, which looks like:
Count
Date Category
08/03/2018 football 1
12/03/2018 rugby 1
13/02/2018 rugby 1
golf 2
14/02/2018 football 1
golf 1
19/02/2018 football 1
fishing 1
I have made this into an index using:
df = df.reset_index()
I have converted the date into a datetime:
The graph is generated using:
label = df['Category']
plt.scatter(df['Date'], df['Count'], label=label)
How can I give a colour to each point that is of a different category, without "hardcoding"?