问题
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?
回答1:
I found the solution in matplotlib.pyplot.legend. The legend takes an attribue 'markerscale'.
plt.legend(loc='best',markerscale=2)
来源:https://stackoverflow.com/questions/49800496/increase-size-of-symbols-in-the-matplotlib-legend