Hello, I was wondering if there is any way to do a horizontal
> bar chart using Matplotlib? Any responses would be greatly
Not currently. Implementing matlab's 'barh' is left as an exercise to
Kidding aside, this would be very easy to implement following the
example of 'bar' and would be a nice addition. Submissions welcome!
The matlab barh doc string
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
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
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)
See also PLOT, BAR, BAR3H.