Bar chart - labeling the bars?

I'm making a bar chart that shows percentages (values from 0 to 100), and I'd like to have the actual bars labeled with their values.

I don't see how to do this, though it seems that countour diagrams have the clabel() function to do this. Is it possible with matplotlib?

Thanks!

-- Asheesh.

···

--
You single-handedly fought your way into this hopeless mess.

Vertical bars, I assume ?
Please check the screenshot page:
http://matplotlib.sourceforge.net/screenshots/barchart_demo.py
should be a big help.
You can find other examples here
http://matplotlib.sourceforge.net/matplotlib_examples_0.87.1.zip.

If you're into OOP, check the "set_xticklabels" command.

···

On Thursday 13 July 2006 14:05, Asheesh Laroia wrote:

I'm making a bar chart that shows percentages (values from 0 to 100), and
I'd like to have the actual bars labeled with their values.

I don't see how to do this, though it seems that countour diagrams have
the clabel() function to do this. Is it possible with matplotlib?

Vertical bars, I assume ?

Yup.

Please check the screenshot page:
http://matplotlib.sourceforge.net/screenshots/barchart_demo.py
should be a big help.

It doesn't show how to put numbers above the bars. It shows a lot of other things, and it was helpful for other things. (-:

You can find other examples here
http://matplotlib.sourceforge.net/matplotlib_examples_0.87.1.zip.

If you're into OOP, check the "set_xticklabels" command.

Those set labels at the bottom. I know how to set those.

I want to add labels (maybe that's not the right word?) to the *top* or the *inside* of the bars themselves that say the actual values. Showing the numbers (as percentages) seems to be the default in pie graphs, at least, as per http://matplotlib.sourceforge.net/screenshots.html .

How do I show the *values* of the bars? I'm sorry if I'm not using the right terminology. Thanks all!

-- Asheesh.

···

On Thu, 13 Jul 2006, PGM wrote:

--
You will gain money by a speculation or lottery.