Increase size of symbols in the matplotlib legend?

legend, matplotlib

Solution

I found the solution in matplotlib.pyplot.legend. The legend takes an attribue 'markerscale'.

plt.legend(loc='best',markerscale=2)

Problem

I draw a plot with markers like so: ``` plt.scatter(xs1, ys1, s=12, linewidths=0, marker='o', label='hello') plt.scatter(xs2, ys2, s=12, linewidths=0, marker='x', label='hello') ``` this produces the right size in the graph, but the symbols are hardly intelligible in the legend. How can I increase the size of the symbols in the legend?

Original source