[Matplotlib-users] legend problem

2006-09-08 Thread Jean_Francois Moulin
Hi all! I have a small problem with the legend() stuff... when plotting several lines like in: name=0 for curve in data: plot(curve[0],curve[1],label=str(name)) name+=1 legend() show() the first two curves appear with a label but without the line represented in the legend box. More

[Matplotlib-users] Legend problem

2008-02-07 Thread chombee
My legend shows both plots as the same colour (blue) when in fact they are different colours. Here's the relevant code: font = FontProperties(size='small'); ... b1 = bar(i,lowermeans,width,color='b') b2 = bar(i+width,uppermeans,width,color='y') ... legend((b1,b2

Re: [Matplotlib-users] Legend problem

2008-02-07 Thread Ryan May
chombee wrote: > My legend shows both plots as the same colour (blue) when in fact they > are different colours. Here's the relevant code: > > font = FontProperties(size='small'); > ... > b1 = bar(i,lowermeans,width,color='b') > b2 = bar(i+width,uppermeans,width,color='y') >

Re: [Matplotlib-users] Legend problem

2008-02-07 Thread chombee
On Thu, 2008-02-07 at 10:21 -0600, Ryan May wrote: > Changing the legend call to this fixed it: > P.legend((b1[0],b2[0]),('lower','upper')) That fixed it for me too. Thanks. The thread just started by Reckoner about the same problem also has the answer: "In a nutshell, bar returns a list of recta

Re: [Matplotlib-users] Legend problem

2008-02-07 Thread Ryan May
Ryan May wrote: > chombee wrote: >> My legend shows both plots as the same colour (blue) when in fact they >> are different colours. Here's the relevant code: >> >> font = FontProperties(size='small'); >> ... >> b1 = bar(i,lowermeans,width,color='b') >> b2 = bar(i+width,uppermeans,