numpoints in legend() function for scatter plot is not working in matplotlib 1.1.0?

Dear all,

I found that the numpoints in legend function for scatter plot is not working?

import matplotlib as mat
import matplotlib.pyplot as plt
In [59]: mat.version
Out[59]: ‘1.1.0’

#ordinary plot working
fig=plt.figure()
ax=fig.add_subplot(111)
ax.plot(np.arange(10),‘ro’,label=‘tst’)
ax.legend(numpoints=1)
plt.show()

#but not scatter plot
fig=plt.figure()
ax=fig.add_subplot(111)
ax.scatter(np.arange(10),np.arange(10),marker=‘o’,label=‘tst’)
ax.legend(numpoints=1)
plt.show()

cheers,

chao

···


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16