polygon

polygonNode

A closed shape whose outline is its x: and y: vertex series, paired by position. The named shapes take a position and a size; a polygon takes its outline directly.

Only withxyargandpolarplane

#Attributes

On any plane

period
Also written: atLong-format data: one row per x per period, this naming the period column, sliced at the environment's parameter.time.
fillAnimatable
Also written: filledFill polygon.
Defaulttrue
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorColour.
Defaultteal
opacityAnimatable
Opacity.
Default1
dashedAnimatable
Draws the outline dashed. What it is for is the shape that is not there: where a figure was before it moved, a region a constraint rules out, a construction that explains the drawing without being part of it.
Defaultfalse
interpolateAnimatable
linearbezier
Also written: interpolationHow the outline gets from one vertex to the next: linear for straight sides, bezier for a closed round outline, on the same midpoint handles as the line’s. No step — a staircase is a reading against x, and a closed outline is not one.
Defaultlinear
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.
Only withxyplane
xImplicitAnimatable
The vertices' x coordinates, e.g. 0, 2, 1. Numbers or a dataset column; entries may be expressions of parameters.Can be written as shorthand: polygon:value
yAnimatable
The vertices' y coordinates, paired with x by position.
Only withargandplane
zAnimatable
On the argand plane, the readings as complex numbers: written out (1 + i, 2 - i, -3i, a bare number a real), or a column of complex literals bound whole (#roots.z). Instead of re/im.
reAnimatable
On the argand plane, the readings' real parts, one per reading — numbers written out or a column — paired with im by position.
imAnimatable
On the argand plane, the readings' imaginary parts, paired with re by position.
Only withpolarplane
rAnimatable
On the polar plane, the readings' distances from the origin, paired with theta by position.
thetaAnimatable
On the polar plane, the readings' angles in radians (60deg for degrees), paired with r by position; names on a categorical theta.

#Allowed in

#Examples

polygon(x: 0, 2, 1; y: 0, 0, 2)
polygon(x: -1, 1, 0; y: -1, -1, 1; fill: false; colour: teal)