|
|
Content | Prev | Next | Down |
| Syntax |
sbar(Y) |
sbar(Y, x) | |
sbar(Y, x, barStyle) | |
sbar(Y, x, errors) | |
| See Also | sbarh , splot , spquit |
The argument x is a numeric column vector which
specifies the X axis indexes at which
each bar, or bar group will be placed.
The argument barStyle is a character row vector which
must be "stacked" or "grouped". If the barStyle
argument is specified the column dimension of Y must be greater
than 1.
If present, the argument errors is a numeric-valued matrix with
the same row and column dimensions as Y. Each column
of errors specifies the error values that should be plotted
for the corresponding column of Y
Examples
clear
Y = {2., 2.5, 3.25}
sbar(Y)
SigmaPlot will create the following bar plot sbar sbarh
If you enter
sbar([Y, Y*1.5, Y*1.75, Y*1.95])
SigmaPlot will create the following additional plot
If you continue the example above by entering
x = {10, 15, 20}
sbar([Y, Y*2.5], x)
SigmaPlot will create another plot, and your notebook will look like
If you enter
myData = [Y, Y*1.5]
sbar(myData, x, "stacked")
sbar(myData, x, "grouped")
SigmaPlot will create two bar plots of the variable myData.
(The default barStyle is grouped, which does not need
to be specified).
Vertical Bar Charts With Error Bars
spquit for exiting the
current instance of SigmaPlot), and you enter the following at the
O-Matrix prompt
clear
Y = {2., 2.5, 3.25}
YN = [Y, Y*1.5, Y*2, Y*0.8]
x = {10, 15, 20}
sbar(Y, x, {.2, .3, .1})
sbar(YN, x, rand(rowdim(YN), coldim(YN))*2)
SigmaPlot will create a new notebook with 2 plots that look like