Skip to content

stairs

plot · scripts/plot/draw/stairs.m

: stairs (y)
: stairs (x, y)
: stairs (…, linespec)
: stairs (…, prop, val)
: stairs (ax, …)
: h = stairs (…)
: [xb, yb] = stairs (…)

Draw a stairstep plot.

Each value y(i) is held until the next abscissa. The columns of a matrix y give one series each, sharing a vector x. With two output arguments nothing is drawn and the step coordinates are returned: for n points the vectors have 2*n-1 entries.

With one output a column vector of group objects is returned, one per series; their XData and YData hold the original data.