segment

segmentNode

A straight line between two points: segment(start: (0, 0); end: (2, 1)). start is the implicit attribute. Unlike a line, it stops at its endpoints rather than running on to the frame.

#Attributes

startRequiredImplicitAnimatable
Also written: fromOne endpoint, as a coordinate: start: (2, 1). Animatable as a whole, so !cue.to{(4, 3)} moves the end in a straight line.Can be written as shorthand: segment:value
endRequiredAnimatable
Also written: toThe other endpoint, e.g. end: (6, 9).
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorColour.
Defaultgrey
widthAnimatable
Stroke width.
Default2
opacityAnimatable
Opacity.
Default1
dashedAnimatable
Dashed stroke.
Defaultfalse
ticksAnimatable
Congruence hatches across the middle of the segment: one tick, two, three. Two sides carrying the same number of ticks are the same length, which is how a construction says so — the notation angle's arcs already has for angles. A count rather than a flag, because the second pair in a figure needs a second mark.
Default0
Text drawn beside the element — rich text, so $maths$ and inline formatting render. Fades and draws with the element.
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
text-sizeAnimatable
Text size.
Default20
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

segment(start: (0, 0); end: (2, 1))
segment(start: (-2, 1); end: (1, -1); colour: grey)