I try to create scatter plot base dataframe with 3 columns: 'a', 'b' , 'c'.
a | b | c
2 | 0.8 | k
3 | 0.4 | l
4 | 0.2 | k
I set the 'a' column to x axis and the 'b' column to y axis.
fig, ax = plt.subplots()
df = pd.read_csv(csv_file)
ax.scatter(df['a'],df['b'])
plt.show()
The 'c' column is categorical column. I try to use this column to legend that every category will be in other color.
How can I do that?
EDIT
I don't know the labels in the 'c' column and how much labels.