I have the following data:
a b col lab
0 1 6 1 a
1 4 5 2 b
2 1 7 3 c
3 5 5 4 d
4 6 2 5 e
My goal here is to plot a scatter of [a] and [b] and have each value of col be different colors and have a legend that mnaps the color to the label.
I tried the following, but it only shows the legend for the first element.
plt.scatter(df['a'], df['b'], c = df['col'])
plt.legend(df['lab'])
What am I doing wrong?