Skip to content

bar

plot · scripts/plot/draw/bar.m

: bar (y)
: bar (x, y)
: bar (…, width)
: bar (…, style)
: bar (…, color)
: bar (…, prop, val)
: bar (ax, …)
: h = bar (…)

Draw a vertical bar graph.

A vector y gives one series; the columns of a matrix give one series each. The positions x default to 1:rows (y). width is the bar width relative to the smallest spacing of x (default 0.8), style is "grouped" (default) or "stacked", and color is a colour letter or RGB triple for all bars.

The return value is a column vector with one group object per series; each carries the properties XData, YData, BarWidth, BarLayout, BaseValue, FaceColor and EdgeColor.