|
From: Steve W. <pla...@gm...> - 2011-06-20 03:14:22
|
#---------------------------- import matplotlib.pyplot as plt ax = plt.subplot(1,1,1) x = [0.1, 0.3, 2.6, 3.3] y = [25.4, 18.9, 13.5, 12.6] ax.plot(x, y, marker="s", label='foo', linestyle="None") #ax.plot(x, y, marker="s", label='foo') #leg = ax.legend(numpoints=1, title='legend title') leg = ax.legend(title='legend title') print(leg.numpoints) plt.show() #---------------------------- Why does legend.numpoints default to 2? It looks much better when it's 1. I'm using matplotlib version 0.99.3. Steve |