star

A five-pointed star centred at a position on a graph.

starNode
Only withxyargandpolarplane
On this page
A filled star at the origin and a smaller outlined star up and to its right.A filled star at the origin and a smaller outlined star up and to its right.

#Attributes

On any plane
radiusAnimatable
Radius of the five outer points. The inner points sit at 0.4 of it.
Default1
colourAnimatable
Colour.
paint
Also written: color
Defaultpurple
fill-styleAnimatable
How the inside is filled: solid; hatched, ruled with diagonal lines over a pale wash of the colour; dotted, stippled with dots over the wash; or outlined, no fill, the edge alone.
solidhatcheddottedoutlined
Defaultsolid
stroke-styleAnimatable
How the edge is drawn: solid, dashed or dotted. An outlined, dashed shape is the shape that is not there — where a figure was before it moved, a region a constraint rules out.
soliddasheddotted
Defaultsolid
opacityAnimatable
Opacity.
Default1
label
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
lock
Keeps the reader from editing this element on an editable: graph. Nothing at all on a graph that is not editable.
Also written: locked
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.
group
The groups this mark belongs to, comma-separated: group: Early sown, Projected. It is drawn in the colour of the first that has one and the style of the first the graph's key: gives one, unless it writes its own colour: or style, and the footer's key names every group.
Only withxyplane
xImplicitAnimatable
X coordinate.
Can be written as shorthand: star:value
yAnimatable
Y coordinate.
Only withargandplane
zAnimatable
On the argand plane, the position as one complex number — a complex expression: 3 + 2i, (3 + 2i)^2, sqrt(13) * e^(i * a), with i the unit and parameters read as complex. Instead of re/im.
reAnimatable
On the argand plane, the real part of the position, a number; with im. z: gives both at once.
imAnimatable
On the argand plane, the imaginary part of the position, a number; with re. z: gives both at once.
Only withpolarplane
rAnimatable
On the polar plane, the distance from the origin; with theta.
thetaAnimatable
On the polar plane, the angle anticlockwise from the right, in radians — 60deg writes it in degrees; with r. On a categorical theta (theta format:), a name.

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

areaDerived
The shape's area in square data units, a five-pointed star with radius: as its outer radius and 0.4 of it as its inner; on the ordinary, argand and polar planes, and a dash where an axis is a log scale, names or dates, or radius: does not resolve.
perimeterDerived
The length of the shape's outline in data units, a five-pointed star with radius: as its outer radius and 0.4 of it as its inner; a dash where area is.

#Allowed in

#Examples

A filled star at the origin.A filled star at the origin.
graph{
    star(x: 0; y: 0; radius: 2)
}
A smaller star drawn as an outline only.A smaller star drawn as an outline only.
graph{
    star(x: 1; y: 1; radius: 1; fill-style: outlined)
}

#Notes

  • One of seven shape marks — circle, square, rectangle, triangle, star, diamond, hexagon — that differ only in the outline drawn.

Last updated