MATLAB Function Reference | ![]() ![]() |
Plot three-dimensional discrete sequence data
Syntax
Description
Three-dimensional stem plots display lines extending from the xy-plane. A circle (the default) or other marker symbol whose z-position represents the data value terminates each stem.
stem3(Z)
plots the data sequence Z
as stems that extend from the xy-plane.
x and y are generated automatically. When Z
is a row vector, stem3
plots all elements at equally spaced x values against the same y value. When Z
is a column vector, stem3
plots all elements at equally spaced y values against the same x value.
stem3(X,Y,Z)
plots the data sequence Z
at values specified by X
and Y
. X
, Y
, and Z
must all be vectors or matrices of the same size.
stem3(...,'fill')
specifies whether to color the interior of the circle at the end of the stem.
stem3(...,
specifies the line style, marker symbol, and color for the stems. See LineSpec
)
LineSpec
for more information.
h = stem3(...)
returns handles to line graphics objects.
Examples
Create a three-dimensional stem plot to visualize a function of two variables.
See Also
Discrete Data Plots for related functions
See Three-Dimensional Stem Plots for more examples
![]() | stem | stop | ![]() |