curve
An expression in x plotted as a curve. expression is the implicit attribute; domain and range clip where it draws. Publishes derived max and min over the plotted domain.
Only withplane
#Attributes
On any plane
The interval the parametric variable runs over —
[0, 2pi], ends parametised. Required with the parametric coordinates; not with expression.colour
Also written: colorCurve colour.
Default
blueAlso written: filledShades the region the path encloses — the PARAMETRIC form only, where a path can enclose one: an ellipse, a cardioid, a lissajous loop. An arc closes straight across, which shades the segment of a circle;
close turns that into the sector. A y(x) curve takes integral instead, which shades the area under a function and reports what it is worth.Default
falseAlso written: close-atA point the shaded region comes back through before it closes, as a coordinate pair. An arc closed through the centre of its circle is a sector — the wedge no other mark can draw, since
polygon has straight sides and integral closes to the axis. Nothing without fill.Also written: arrowheads, arrow, arrowhead, arrowsEndpoint decoration: an arrow where the curve runs on past the frame, and a dot where its domain stops it — filled for a closed end, open for an open one. Holes in the function are marked either way.
Default
trueText drawn beside the element — rich text, so
$maths$ and inline formatting render. Fades and draws with the element.Declared but not drawn. Animatable —
hidden: true !cue.to{false}(at: 2) reveals it — and unlike a cue, a hidden element still frames the plot, so the axes do not jump when it appears.Default
falseAlso written: lockedKeeps the reader from editing this element on an
editable: graph. Nothing at all on a graph that is not editable.Default
falseOnly withplane
Also written: exp, f, func, functionThe curve as a function of the plane's independent axis: y(x) on the ordinary plane, r(theta) on the polar one. Refused on the argand plane, which has no independent axis — write a position in t there. Not with the parametric coordinates.Can be written as shorthand: curve:value
A position in t: the x coordinate as an expression in
t, with y: and t: — curve(x: cos(t); y: sin(t); t: [0, 2pi]). On the ordinary plane; not with expression.Only withplane
Only withplane
Also written: exp, f, func, functionThe curve as a function of the plane's independent axis: y(x) on the ordinary plane, r(theta) on the polar one. Refused on the argand plane, which has no independent axis — write a position in t there. Not with the parametric coordinates.Can be written as shorthand: curve:value
#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.
max
min
#Allowed in
#Examples
curve(expression: x^2; colour: blue)curve(expression: sin(x); domain: [-3.14, 3.14])#Notes
- Give a curve a node id —
curve#flight(f: …)— to letcue.tracefollow it withpath: #flight.