stem
Single vector input
x = linspace(0,2*pi,50) y = exp(0.3*x).*sin(3*x) stem(y)
Specifying line and area colors
options = struct options.barFill = 'gray' options.markerStroke = 'gray' options.markerFill = 'lightgray' x = 1:0.3:9 y = exp(x).* sin(x) stem(y, options)
Changing base level
options = struct('barBase', 3) y = linspace(-2*pi,2*pi,50) stem(y, options)
Matrix input
x = linspace(0,2*pi,50) y = [cos(x); 0.5*sin(x)] stem(y')
Related documentation
Basic Options and Setup - GeneralBasic Options and Setup - Axes
Basic Options and Setup - Frame and Canvas
Basic Options and Setup - Lines, Markers, Areas and Bars
Basic Options and Setup - Legend
Basic Options and Setup - Labels
2D graphs - Secondary Axis
2D graphs - Formatting Axes