[SciPy-User] getting started with arrays and matplotlib

Chris Withers chris@simplistix.co...
Sun Aug 7 16:22:19 CDT 2011

Hi All,

I'm a new user returning to SciPy after quite a long break, so, a few 
high-level questions first:

- Are there any good books or other narrative docs that cover the bulk 
of the core numpy stuff

- Ditto, but for visualisation, particularly with matplotlib or the 
Enthought visualisation suites.

I'm particularly interested in step-by-step docs/books with lots of 
examples, versus reference docs that basically need the user to know 
what they're looking for in a chicken and egg fashion, which was my 
previous experience of scipy docs...

Now, the specific problem I'm looking to solve it a stacked bar chart of 
ticket sales for an event over time. The data I have is basically a log 
file of ticket sales.

I was looking to build a 4-dimensonal array as follows, with each cell 
representing ticket sales for that week at that venue at that event:

event: 2011

venue t-3 week t-2 week t-1 week
v1    10       20       30
v2    15       30       45

event: 2010

venue t-3 week t-2 week t-1 week
v1    1        2        3
v2    15       30       45


Now, first question: what's the best way to build this array given that 
I may only see the arrival of a new venue a fair way through building 
the data structure? How can I efficiently say "please add a new row to 
my array", I don't know what the 4th dimension equivalent is ;-)

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?)

Any help gratefully received!



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

More information about the SciPy-User mailing list