Graphics    

Three-Dimensional Stem Plots

stem3 displays 3-D stem plots extending from the xy-plane. With only one vector argument, MATLAB plots the stems in one row at x = 1 or y = 1, depending on whether the argument is a column or row vector. stem3 is intended to display data that you cannot visualize in a 2-D view.

Example - 3-D Stem Plot of an FFT

For example, fast Fourier transforms are calculated at points around the unit circle on the complex plane. So, it is interesting to visualize the plot around the unit circle. Calculating the unit circle

and the magnitude frequency response of a step function

displays the data using a 3-D stem plot, terminating the stems with filled diamond markers.

Label the Graph

Label the graph with the statements

To change the orientation of the view, turn on mouse-based 3-D rotation.

Example - Combining Stem and Line Plots

Three-dimensional stem plots work well when visualizing discrete functions that do not output a large number of data points. For example, you can use stem3 to visualize the Laplace transform basis function,, for a particular constant value of s.

Using t as magnitudes that increase with time, create a spiral with increasing height and draw a curve through the tops of the stems to improve definition.

Label the Graph

Add axes labels, with the statements


  Combining Stem Plots with Line Plots Stairstep Plots