groupbar
groupbar(x, y)
Input: x, y · Output: no output
What it is
Grouped (side-by-side) bar chart: x (Vec, category positions) and y (Mat or list of Vecs, one series per group of bars).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
groupbar(x, y) | x Vec or Matnot documented yety Vec or Matnot documented yet | no output | — |
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)
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.