Hello, I was wondering if there is any way to do a horizontal

> bar chart using Matplotlib? Any responses would be greatly

> appreciated.

Not currently. Implementing matlab's 'barh' is left as an exercise to

the reader

Kidding aside, this would be very easy to implement following the

example of 'bar' and would be a nice addition. Submissions welcome!

JDH

The matlab barh doc string

help barh

BARH Horizontal bar graph.

BARH(X,Y) draws the columns of the M-by-N matrix Y as M groups of

N horizontal bars. The vector X must be monotonically increasing

or decreasing.

BARH(Y) uses the default value of X=1:M. For vector inputs,

BARH(X,Y) or BARH(Y) draws LENGTH(Y) bars. The colors are set by

the colormap.

BARH(X,Y,WIDTH) or BARH(Y,WIDTH) specifies the width of the

bars. Values of WIDTH > 1, produce overlapped bars. The

default value is WIDTH=0.8.

BARH(...,'grouped') produces the default vertical grouped bar chart.

BARH(...,'stacked') produces a vertical stacked bar chart.

BARH(...,LINESPEC) uses the line color specified (one of 'rgbymckw').

H = BARH(...) returns a vector of patch handles.

Use SHADING FACETED to put edges on the bars. Use SHADING FLAT to

turn them off.

Examples: subplot(3,1,1), barh(rand(10,5),'stacked'), colormap(cool)

subplot(3,1,2), barh(0:.25:1,rand(5),1)

subplot(3,1,3), barh(rand(2,3),.75,'grouped')

See also PLOT, BAR, BAR3H.