Getting started with bar charts

The matplotlib philosophy is one of "make easy things easy" - which I
totally agree with.

I am a new user of matplotlib; and a relatively new Python programmer.
I am trying to produce some bar charts for a colleague, in an attempt to
show how easy it is to do this with Python/matplotlib (as opposed to the
old Excel/cut-n-paste approach!).

I think I have got the basics OK (two subplots), but I am struggling
with what *I* think should be trivial tasks - such as setting line
widths, font sizes, bar colours etc. The examples do not really seem to
deal with these issues, and in fact the homepage implies these are for a
"power user", which I find strange because these are some of the first
things most users want to "fiddle" with! What I have done as a
temporary fix is alter all the settings in the matplotprc file; but this
is not ideal as these settings affect *all* charts.

It appears the manual (which I assume might be able to help me) is not
"downloadable". The link :
http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf
results in a 2.41MB PDF file, which Acrobat Reader reports is
"damaged". (I also noticed when running
the download, that the download manager seemed to be expecting a 4.5MB
file?)

The example:
http://www.scipy.org/Cookbook/Matplotlib/BarCharts
shows how to setup labels for a bar chart - but it would be great if
there was a line-by-line explanation of what each step means; its not
very clear!

The last point of "mystery" to me is that of "plot" vs "subplot" vs
"bar" - are these all essentially the same family of object, with some
differences in their capabilities - or vastly different beasts?

Any help with these "newbie" issues would be appreciated!

Thanks
Derek

···

--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.

CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html

CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html

For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@...1230...

This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.

If you can’t find help anywhere else, the matlab documentaiton may be helpful.
Most of the matplotlib functions are taken right from there.
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/subplot.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/bar.html

–bb

···

On 8/21/06, Derek Hohls <DHohls@…1229…> wrote:

The matplotlib philosophy is one of “make easy things easy” - which I
totally agree with.

I am a new user of matplotlib; and a relatively new Python programmer.
I am trying to produce some bar charts for a colleague, in an attempt to

show how easy it is to do this with Python/matplotlib (as opposed to the
old Excel/cut-n-paste approach!).

I think I have got the basics OK (two subplots), but I am struggling
with what I think should be trivial tasks - such as setting line

widths, font sizes, bar colours etc. The examples do not really seem to
deal with these issues, and in fact the homepage implies these are for a
“power user”, which I find strange because these are some of the first

things most users want to “fiddle” with! What I have done as a
temporary fix is alter all the settings in the matplotprc file; but this
is not ideal as these settings affect all charts.

It appears the manual (which I assume might be able to help me) is not

“downloadable”. The link :
http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf
results in a 2.41MB PDF file, which Acrobat Reader reports is

“damaged”. (I also noticed when running
the download, that the download manager seemed to be expecting a 4.5MB
file?)

The example:

http://www.scipy.org/Cookbook/Matplotlib/BarCharts

shows how to setup labels for a bar chart - but it would be great if
there was a line-by-line explanation of what each step means; its not
very clear!

The last point of “mystery” to me is that of “plot” vs “subplot” vs
“bar” - are these all essentially the same family of object, with some
differences in their capabilities - or vastly different beasts?

Any help with these “newbie” issues would be appreciated!

Thanks
Derek