Skip to content

stairs

Stairs plot — like step but with the stems shown.

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

Similar to step but draws both horizontal segments and connecting vertical lines, producing a stairs / staircase pattern.

stairs(1:10, randn(1, 10))
  • step — Step plot — piecewise-constant series.
  • stem — Stem plot — vertical lines from the x-axis to each data point.