How to create a scatter plot legend with only one symbol for each label?

In the legend command you can use the scatterpoints option:

ax.legend(loc=0, scatterpoints = 1)

For a normal plot, it is the option numpoints.

Here you can find more information about the keyword arguments for the legend: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)