Re: [Matplotlib-users] legend: symbols is duplicated

2010-04-23 Thread Carlos Grohmann
Many thanks!

carlos

On Thu, Apr 22, 2010 at 18:54, Gökhan Sever  wrote:
>
>
> On Thu, Apr 22, 2010 at 4:44 PM, Carlos Grohmann 
> wrote:
>>
>> Hi all,
>>
>> I'm getting this weird behavior of legend. I always get two symbols in
>> front of the labels, instead of one.
>> Did anyone experienced this before?
>>
>> I'm working with MPL in a WxPython app.
>>
>> code snippet:
>>
>>
>> [code]
>>            for i in range(len(self.idxPlan)):
>>                x = self.PeigenList[i][14] + (self.PeigenList[i][15] / 2)
>>                y = self.PeigenList[i][15] * sqrt3_2
>>                axes.plot(x,y, self.PProps[i][3], c=self.PProps[i][2],
>> ms=self.PProps[i][4],label=self.Pname[i])
>>
>>            axes.legend(bbox_to_anchor=(0.85, 0.75), loc=2,
>> prop=FontProperties(size='small'))
>>
>>            axes.set_xlim(-0.1,1.2)
>>            axes.set_ylim(-0.1,1.2)
>>            self.dataCanvas.draw()
>>
>> [\code]
>>
>>
>> tks
>> --
>> Prof. Carlos Henrique Grohmann - Geologist D.Sc.
>> Institute of Geosciences - Univ. of São Paulo, Brazil
>> http://www.igc.usp.br/pessoais/guano
>> Linux User #89721
>> 
>> Can’t stop the signal.
>
> Hi,
>
> Try using numpoints keyword:
>
> plt.legend(numpoints=1)
>
>
> --
> Gökhan
>



-- 
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano
Linux User #89721

Can’t stop the signal.

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend: symbols is duplicated

2010-04-22 Thread Gökhan Sever
On Thu, Apr 22, 2010 at 4:44 PM, Carlos Grohmann
wrote:

> Hi all,
>
> I'm getting this weird behavior of legend. I always get two symbols in
> front of the labels, instead of one.
> Did anyone experienced this before?
>
> I'm working with MPL in a WxPython app.
>
> code snippet:
>
>
> [code]
>for i in range(len(self.idxPlan)):
>x = self.PeigenList[i][14] + (self.PeigenList[i][15] / 2)
>y = self.PeigenList[i][15] * sqrt3_2
>axes.plot(x,y, self.PProps[i][3], c=self.PProps[i][2],
> ms=self.PProps[i][4],label=self.Pname[i])
>
>axes.legend(bbox_to_anchor=(0.85, 0.75), loc=2,
> prop=FontProperties(size='small'))
>
>axes.set_xlim(-0.1,1.2)
>axes.set_ylim(-0.1,1.2)
>self.dataCanvas.draw()
>
> [\code]
>
>
> tks
> --
> Prof. Carlos Henrique Grohmann - Geologist D.Sc.
> Institute of Geosciences - Univ. of São Paulo, Brazil
> http://www.igc.usp.br/pessoais/guano
> Linux User #89721
> 
> Can’t stop the signal.
>

Hi,

Try using numpoints keyword:

plt.legend(numpoints=1)


-- 
Gökhan
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users