Skip to content

stem

Stem plot — vertical lines from the x-axis to each data point.

h = stem(y, ...)
h = stem(x, y, ...)

Plots data as discrete impulses (vertical stems from the baseline to each point). Common for signals and discrete sequences.

stem(0:10, sin(0:10))
  • stem3 — 3D stem plot — vertical lines from a baseline plane to each (x, y, z).
  • step — Step plot — piecewise-constant series.
  • stairs — Stairs plot — like step but with the stems shown.
  • bar — Vertical bar chart.