python - matplotlib scatter plot with color label and legend specified ... plt.scatter (scatter_x, scatter_y, c=group, label=group) plt.legend () Unfortunately, I did not get the legend as expected. How to show the legend properly? I expected there are five rows and each row shows the color and group correspondences. python matplotlib plot legend Share asked Oct 29, 2017 at 23:19 Light Yagmi 4,655 12 39 60 Add a comment