I managed to generated the chart I want by twisting the hist() function. I  
chart and source code can be found here:

http://tungwaiyip.info/blog/2010/02/26/visualization_using_variable_width_bar_chart

If you have any comment on my method it will be greatly appriciated.

Wai Yip


> I want to plat a column graph with variable width. The size of both axis
> have meaning. The Y-axis is the density. The X-axis is the size. Let's  
> say
> it is a graph of world population by country. Say China has 1 billion
> people occupying an area of 10000 km2. And Japan has 0.1 billion people
> occupying an area 500 km2. So their density is 1 billion / 10000 and 0.1
> billion / 500 respectively. The chart should show Japan's column twice as
> high as China but much narrower. And the area of each column reflects the
> population.
>
> My question is how do I plot a column graph with variable width? The
> closest I can find is in the histogram in the second example below
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html
>
> I'm quite new to matplotlib. Thanks for your help.
>
> Wai Yip
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to