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. Parameter

Parameter

parameterBlock elementGraphAliases:param

A named quantity the reader can vary with a slider. Inside a `canvas.graph` it drives every expression that mentions its letter — a curve of `a * x^2` bends as `a` moves. The body is what the parameter is called in front of a reader; without one it shows as its letter.

Attributes

varRequiredImplicit
single-char
Variable name (single letter, a-z).The head shorthand supplies it: parameter:value
name
Also written: labelWhat the parameter is called in front of a reader. Rich text, so Frequency $b$ sets its own maths.
range
parametised-interval
Range interval [start, end].
Default[-10, 10]
step
number
Step size.
Default1
default
number
Default value.
Default0
hidden
boolean
Keeps the parameter out of the footer: the expressions still use it, the reader cannot move it.
Defaultfalse
lock
boolean
Also written: lockedKeeps the reader from editing it on an `editable:` graph.
Defaultfalse

Derived attributes

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

valueDerived
The value the reader has currently set (the default until touched).

Allowed content

Body { }Inline instructional text and expressions

Allowed in

scene [ ]cue { }cue.draw { }cue.trace { }cue.highlight { }cue.spotlight { }

Examples

parameter{steepness}(var: a; range: [0, 4]; step: 0.25; default: 2)
curve(f: a * x^2; domain: [-3, 3])
parameter{
    Move the slider to change a.
}(
    var: a
    range: [-5, 5]
    step: 0.5
)
On this page
AttributesDerived attributesAllowed inExamples
Parameter · Internote