bar
Bar graph.
Syntax
bar(Y)
bar(X, Y)
bar(..., width)
bar(..., color)
bar(..., propertyName, propertyValue)
bar(ax, ...)
b = bar(...)
Input argument
X - x-coordinates: scalar, vector or string array.
Y - y-coordinates: vector.
width - scalar, 0.8 (default).
color - a scalar string or row vector character: short name color.
propertyName - a scalar string or row vector character.
propertyValue - a value.
ax - Axes object.
Output argument
b - patch graphics object.
Description
bar(X, Y) creates a bar graph using two sets of X-Y data vectors.
When only one argument is provided (Y), it is interpreted as a vector containing Y values, and the X coordinates are generated as a sequence from 1 to the number of elements in the Y vector.
You can optionally specify the width of the bars.
A value of 1.0 will make each bar exactly touch its neighboring bars, while the default width is set to 0.8.
Examples
See also
History
Version | Description |
---|---|
1.0.0 | initial version |
Author
Allan CORNET
Last updated