brace

braceNode

A curly brace spanning from one point to another, with its label at the tip: brace(start: (0, 0); end: (4, 0); label: $w$). What axis.brace is for an interval ON an axis, this is for a distance anywhere in the picture — the height a projectile reaches, the object distance in a ray diagram, the side of a triangle. It bows to the LEFT of the direction it is written in, so swapping the ends (or flip) puts it on the other side, and its depth is in pixels, like an angle's radius: notation on the picture rather than a measurement in the data.

#Attributes

startRequiredImplicitAnimatable
Also written: fromThe point the span begins at, as a coordinate pair. Written first, and the brace bows to the left of the direction from here to end.Can be written as shorthand: brace:value
endRequiredAnimatable
Also written: toThe point it ends at.
What the span is called, at the brace's tip — rich text, so $maths$ renders. A brace with nothing to say is a bracket; the name is the reason to draw one.
flipAnimatable
Bows to the other side of the line, without swapping the two ends round.
Defaultfalse
depthAnimatable
How far the brace bows out from the line it spans, in pixels — so it neither swells nor thins as the reader zooms.
Default10
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorThe brace's colour, and its label's.
Defaultneutral
widthAnimatable
Stroke thickness.
Default1.5
opacityAnimatable
Opacity of the whole mark, 0 to 1.
Default1
sizeAnimatable
Also written: text-sizeLabel text size.
Default16
hiddenAnimatable
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
Also written: lockedKeeps the reader from editing this element on an editable: graph. Nothing at all on a graph that is not editable.
Defaultfalse
layerAnimatable
Paint order among the marks: a higher layer is drawn later, on top; equal or omitted, the marks stack in document order (later on top). Written z: before the argand plane took that letter for its coordinate.

#Allowed in

#Examples

brace(start: (0, 0); end: (4, 0); label: $w$)
brace(start: (3, 0); end: (3, 2.4); label: $H$; colour: teal)
brace(start: (1, 1); end: (4, 3); label: $d$; flip: true; depth: 14)