Manual
Overview
Language
IntroductionScenes & structureText & inlineGraphsCode panesAnimationDataReuse & logicExpressions & parameters
Elements
Text
ParagraphHeading 1Heading 2Heading 3Heading 4Unordered ListDivider
Media
ImageTableEquation
Callouts
NoteDefinitionExampleTask
Graph
GraphLinePolygonCurveIntegralScatterHistogramPointSegmentVectorCircleSquareRectangleTriangleStarDiamondHexagonTextAxis labelAxis BraceFitResidualsContourHeatmapParameter
Code
Code canvasLines
Animation
CueDraw cueTrace cueHighlight cueSpotlight cueType cue
Structure
SceneStep
Reference
Internote Reference
Inline
Formatting
BoldItalicsInline CodeHighlightLink
Text colour
Red textOrange textYellow textGreen textTeal textBlue textPurple textPink textGrey text
Maths
Maths
Reference
Internote ReferenceValueConstant
Other
FootnoteIcon
Directives
DatasetIncludeConstantsTemplatePresetConditionalForIgnore
Keyframes
KeyframeZoom keyframe
Attribute types
?
  1. Elements
  2. Graph
  3. Curve

Curve

curveBlock elementGraph

A mathematical function or expression plotted as a curve. Supports domain/range restriction for specific intervals.

Attributes

expressionRequiredImplicit
parametised-expression
Also written: exp, f, func, functionMath expression for y(x).The head shorthand supplies it: curve:value
colour
colour
Also written: colorCurve colour.
Defaultblue
width
number
Stroke width.
Default2
dashed
boolean
Dashed stroke.
Defaultfalse
domain
parametised-interval
Also written: x-domainRestrict domain.
range
parametised-interval
Also written: y-rangeRestrict range.
endpoints
boolean
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.
Defaulttrue
label
rich-text
Text drawn beside the element — rich text, so `$maths$` and inline formatting render. Fades and draws with the element.
hidden
boolean
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.
Defaultfalse
lock
boolean
Also written: lockedKeeps the reader from editing this element on an `editable:` graph. Nothing at all on a graph that is not editable.
Defaultfalse
text-size
number
Text size.
Default20
z
parametised-number
Stacking order. Higher z renders on top; when omitted or equal, elements stack in document order (later on top).

Derived attributes

Computed while the element renders — read one with #id.name in attribute position or !value:#id.name() in prose, never set.

maxDerived
The largest value the expression takes over the curve's effective domain, tracking parameters live.
minDerived
The smallest value the expression takes over the curve's effective domain, tracking parameters live.

Allowed content

Body { }Inline Chalk content (formatted text, inline math, links, and inline elements)

Allowed in

canvas.graph { }cue { }cue.draw { }cue.trace { }cue.highlight { }cue.spotlight { }

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 let `cue.trace` follow it with `path: #flight`.
On this page
AttributesDerived attributesAllowed inExamplesNotes
Curve · Internote