[SciPy-User] getting started with arrays and matplotlib
Tue Aug 9 15:46:35 CDT 2011
On Aug 7, 2011, at 2:22 PM, Chris Withers wrote:
> 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.
Well, this is probably more basic than you want, but O'Reilly's "Data Analysis with Open Source Tools" is certainly a nice low-level intro for a beginner:
It's available on Safari Bookshelf, and also talks about using matplotlib (and R and GSL and ...). I'm unaware of any nice Chaco "narratives."
> 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 ;-)
You might consider doing what matlab does under the hood and just double the array when you run out of space. You can also keep a view around that restricts to just the portion of the data that's "real."
> 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?)
The book above would do a good job with this.
More information about the SciPy-User