line
A path through a run of points. x: and y: hold one axis each, paired by position — numbers written out, or dataset columns (x: #co2.year; y: #co2.ppm). Drawn straight between the points by default; interpolate: step instead holds each value until the next x and then jumps, giving a staircase, and marks each jump with a dot: filled where the function lands, hollow where it left.
Only withplane
#Attributes
On any plane
Also written: atLong-format data: one row per x per period, this naming the period column. The line then shows the slice at whatever the environment's
parameter.time holds, gliding between the two periods that bracket it.colour
Also written: colorColour of the path.
Default
pinkinterpolate
linear joins them, step holds and jumps, bezier rounds the corners off with a cubic through every reading whose handles sit at the midpoints of the legs either side (t = 0.5, so it cannot overshoot). A curve says the quantity varied smoothly between the readings; a tally did not.Default
linearAlso written: dotsOn a step, the dots at each jump — filled where the value is taken, hollow where it is not.
Default
trueAlso written: connectOn a step, the vertical joins between treads. Off by default: a function has one value at each x.
Default
falseOnly withplane
The x readings: numbers (
0, 1, 2 — entries may be expressions of parameters), or a dataset column (#co2.year). A column of names reads against a categorical axis (x format:, or the axis’s auto rule); an ISO date column reads as fractional years (2024-03-15 → ≈2024.2), and auto labels them in years. Paired with y by position.Can be written as shorthand: line:valueOnly withplane
On the argand plane, the readings as complex numbers: written out (
1 + i, 2 - i, -3i, a bare number a real), or a column of complex literals bound whole (#roots.z). Instead of re/im.On the argand plane, the readings' real parts, one per reading — numbers written out or a column — paired with
im by position.#Allowed in
#Examples
line(x: 0, 2, 4; y: 0, 2, 1; colour: pink)line(x: 0, 1, 2; y: 0, 0.5, 1; interpolate: step)line(x: #co2.year; y: #co2.ppm)line(x: #temperatures.month; y: #temperatures.sydney)