[SciPy-User] getting started with arrays and matplotlib

Chris Withers chris@simplistix.co...
Sat Aug 20 18:52:01 CDT 2011


On 07/08/2011 22:29, David Warde-Farley wrote:
>> Secondly, once I've populated this, any good examples of how to turn it
>> into a bar chart? (the simple bar chart would be number of sales on the
>> y-axis, weeks before the event on the x-axis, however, what I'd then
>> like to do is split each bar into chunks for each venue's sales, if that
>> makes sense?)
>
> This might give you an example of what you need:
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/bar_stacked.html
>
> but you'd be better off asking on matplotlib-users.

Thanks, that was a good start.

One question: How can I automatically get a list of colours for each 
bar? I don't know how many bars I'm going to have so I can't manually 
pick them...

This feels like a common enough problem that I'm guessing there's a 
solution somewhere in matplotlib?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


More information about the SciPy-User mailing list