Re: [Matplotlib-users] legend for bar charts

2008-09-11 Thread John Hunter
On Thu, Sep 11, 2008 at 1:33 PM, Jonathon Anderson <[EMAIL PROTECTED]> wrote: > I eventually did it with > >b3l = bar(dates, b3, color='#9E73C1', width=4) >b2l = bar(dates, b2, color='#A6DE62', width=4) >b1l = bar(dates, b1, color='#F35E5A', width=4) >b0l = bar(dates, b0, color='#49

Re: [Matplotlib-users] legend for bar charts

2008-09-11 Thread Jonathon Anderson
I eventually did it with b3l = bar(dates, b3, color='#9E73C1', width=4) b2l = bar(dates, b2, color='#A6DE62', width=4) b1l = bar(dates, b1, color='#F35E5A', width=4) b0l = bar(dates, b0, color='#4992DE', width=4) leg = legend([b3l[0], b2l[0], b1l[0], b0l[0]],["98,304 -

Re: [Matplotlib-users] legend for bar charts

2008-09-11 Thread Jonathon Anderson
For the record, I also just tried bar(dates, b3, color='#9E73C1', width=4) bar(dates, b2, color='#A6DE62', width=4) bar(dates, b1, color='#F35E5A', width=4) bar(dates, b0, color='#4992DE', width=4) leg = legend(["98,304 - 163,840 Cores", "32768 - 98,303 Cores", "8,192 - 32,

[Matplotlib-users] legend for bar charts

2008-09-11 Thread Jonathon Anderson
I have a multicolor bar chart that I create like this: bar(dates*4, b3 + b2 + b1 + b0, color=(['#9E73C1']*len(dates) + ['#A6DE62']*len(dates) + ['#F35E5A']*len(dates) + ['#4992DE']*len(dates)), width=4) How can I create a legend for this? leg = legend(["98,304 - 1

Re: [Matplotlib-users] legend for bar charts?

2008-02-07 Thread John Hunter
On Feb 7, 2008 8:21 AM, Reckoner <[EMAIL PROTECTED]> wrote: > is it possible to use matplotlib's legend() for a bar chart? I am plotting > a number of bars with different colors on the same axes and I would like to > label each color. > > legend () seems to want to label every single bar on my ba

[Matplotlib-users] legend for bar charts?

2008-02-07 Thread Reckoner
is it possible to use matplotlib's legend() for a bar chart? I am plotting a number of bars with different colors on the same axes and I would like to label each color. legend () seems to want to label every single bar on my bar chart. Thanks in advance. -