panel
panel(rows, cols, k)
Input: rows, cols, k · Output: no output
What it is
Selects cell k (integer, 1-based, row-major) of a rows-by-cols (integers) grid as the target for further drawing. subplot is the same call under MATLAB's name.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
panel(rows, cols, k) | rows —not documented yetcols —not documented yetk —not documented yet | no output | subplot is the same call under MATLAB's name. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
panel(2, 1, 1)
bode_magnitude(Z, freqs)
panel(2, 1, 2)
bode_phase(Z, freqs)
from specialized
panel(2, 2, 1)
plot(t, y)
panel(2, 2, 2)
plot(f, mag)
panel(2, 2, 3)
scatter(y, yhat)
panel(2, 2, 4)
plot(losses, color="orange")
· plot: figure 53 (6 points) · plot: figure 54 (200 points) · scatter: figure 55 (500 points) · plot: figure 56 (40 points)
from plotting
group_a = randn(40, seed = 11)
group_b = randn(40, seed = 12) + 0.5
group_c = randn(40, seed = 13) - 0.3
panel(1, 2, 1)
histogram(y, 20)
panel(1, 2, 2)
boxplot(group_a, group_b, group_c)
· histogram: figure 57 (6 points, 20 bins)
from plotting
How it works
panel(rows, cols, index) -- MATLAB-style subplot, kept under both spellings (§13.C: "panel" is the current name; subplot remains a plain alias, same pattern as the def fn/:= alias).
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.
See also
subplot — documented in the same entry.