Qu

splineplot

Builtin index · Plotting

splineplot(x, y)

Input: x, y · Output: no output

What it is

Natural cubic spline through the control points (x[i], y[i]) (equal-length numeric Vecs), resampled onto 200 points for a smooth line.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
splineplot(x, y)
x Vecnot documented yet
y Vecnot 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.

figure()
splineplot([0, 1, 2, 3, 4], [0, 2, 1, 3, 2])
figure()
pwl([0, 1, 2, 3, 4, 5, 6], [0, 1, 1.5, 3, 3.2, 3.5, 5])
figure()
spiderplot([3, 4, 2, 5, 4])
figure()
raincloud(randn(60, seed = 6), randn(60, seed = 7))
-4 -3 -2 -1 0 1 2 3 4 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6

from plotting

How it works

splineplot(x, y) -- a natural cubic spline through the control points, resampled onto a dense line for a smooth curve.

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