vector

vectorNode

An arrow from (x, y) along (dx, dy). dx is the implicit attribute, and the tail sits at the origin unless x and y move it.

#Attributes

On any plane

colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorColour.
Defaultgreen
widthAnimatable
Stroke width.
Default2
opacityAnimatable
Opacity.
Default1
dashedAnimatable
Dashed stroke.
Defaultfalse
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 withxplane
dxImplicitAnimatable
X component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.Can be written as shorthand: vector:value
dyAnimatable
Y component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.
X coordinate of the tail. Defaults to 0, so a vector with only dx and dy starts at the origin.
Only withxyplane
dxImplicitAnimatable
X component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.Can be written as shorthand: vector:value
dyAnimatable
Y component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.
X coordinate of the tail. Defaults to 0, so a vector with only dx and dy starts at the origin.
Y coordinate of the tail.
Only withargandplane
On the argand plane, the number the arrow IS — a complex expression (3 + 2i, (1 + i)^2, e^(i * a), i the unit) drawn from the tail out by this displacement. dx/dy are not read there.
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
dxImplicitAnimatable
X component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.Can be written as shorthand: vector:value
dyAnimatable
Y component. Cartesian on the ordinary and polar planes alike; on the argand plane the displacement is z:.
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.

#Allowed in

#Examples

vector(x: 0; y: 0; dx: 3; dy: 2)
vector(x: -1; y: -1; dx: 2; dy: 1; dashed: true)