Qu

stair

Builtin index · Plotting

stair(x, y)

Input: x, y · Output: no output

What it is

Step (staircase) plot of equal-length numeric Vecs x, y. stair is the only callable spelling — step is a reserved keyword (to ... step ... ranges) so it can't be a function name; the series is still internally marked marker "step".

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
stair(x, y)
x Vecnot documented yet
y Vecnot documented yet
no outputstair is the only callable spelling — step is a reserved keyword (to ... step ... ranges) so it can't be a function name; the series is still internally marked marker "step".

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

x = 0 to 9
y = sin(x / 2)
figure()
stem(x, y)
figure()
stair(x, y)
figure()
groupbar([1, 2, 3], [3, 5, 2])
figure()
stackbar([1, 2, 3], [3, 5, 2])
figure()
Z = [1, 2, 3, 4, 5; 2, 3, 4, 5, 6; 3, 4, 5, 6, 7]
waterfall(0 to 4, Z)
output
· stem: figure 14 (10 points)
· stair: figure 15 (10 points)
· groupbar: figure 16 (3 points)
· stackbar: figure 17 (3 points)
3 4 5 6 7 8 9 10 11 12 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

from plotting

How it works

stair is the only callable spelling: step is already a reserved keyword (to ... step ... ranges), so step(...) can't be a function call — it lexes as a keyword, not an identifier. The rendered marker is internally still "step".

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.