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

Scatter

scatterBlock elementGraph

A scatter plot of points with optional different shapes and colors. Perfect for showing data distributions.

Attributes

dataRequiredImplicit
parametised-coordinate-list
Also written: pointsCoordinate list.The head shorthand supplies it: scatter:value
shape
shape-type
Point shape.
Defaultcircle
size
parametised-number
Point size.
Default6
colour
colour
Also written: colorColour.
Defaultred
opacity
number
Opacity.
Default1
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
z
parametised-number
Stacking order. Higher z renders on top; when omitted or equal, elements stack in document order (later on top).

Allowed in

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

Examples

scatter(data: (0,0),(1,2),(2,1))
scatter(data: (-1,1),(0,0),(1,-1); shape: square; colour: red)
On this page
AttributesAllowed inExamples
Scatter · Internote