|
From: Chao Y. <cha...@gm...> - 2012-09-10 06:57:05
|
Hi Ben, I tried the "numpoints" in legend function for scatter plot, in dev version and GTKAgg backend it works. In [3]: mat.__version__ Out[3]: '1.2.x' In [4]: mat.get_backend() Out[4]: 'GTKAgg' Chao On Sun, Sep 9, 2012 at 9:28 PM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Apr 10, 2012 at 12:43 PM, wiswit <cha...@gm...> wrote: > >> >> 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 >> >> > Confirmed... this is still broken. > > Ben Root > -- *********************************************************************************** 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 ************************************************************************************ |