stem
Creates a stem plot in an axis and returns the stem handles.
Syntax
h = stem(y)
h = stem(x, y)
h = stem(x, y, fmt)
h = stem(... property, value, ...)
h = stem(hAxes, ...)
Inputs
- x,y
- Range of the x and y axes.
- fmt
- The formatting string for the curve. It can be any combination of the following strings:
- line style: '-', '-.', ':', '--', '-:'.
- line color: 'r', 'g', 'b', 'c', 'y', 'm', 'w', 'b'.
- marker style: 's', 'o', 'd', 'x', 'v', '^', '+', '*', '.'.
- property
- Properties that control the appearance or behavior of the graphics object.
- value
- Value of the properties.
- hAxes
- Axis handle.
Outputs
- h
- The handle of the stem graphics object.
Examples
Simple stem example:
clf;
stem(rand(1,10))
stem example with format and property options:
clf;
x=linspace(0, 2*pi, 100);
y=sin(x);
stem(x,y, '--g', 'linestyle', ':');
Comments
If there is no axis, one id created first. If x is omitted, the index of
y is used as data to associate with the the x axis.
stem takes optional arguments to control the stem style. It can be
either a format string, property/value pair, or both. If the first argument of
stem() is an axis handle, lines are created in that
axis:
h = plot(hAxes, ...)