lollipop

lollipopNode

A value drawn as a stem with a dot at its end. What a bar is for a quantity that fills an interval, this is for one that stands at a POINT — a discrete distribution above all, where P(X = k) belongs to the single value k and a bar drawn there claims a width the quantity does not have. Two forms, as a histogram has: a position and a value, paired by position as a scatter's are (lollipop(x: 0, 1, 2; y: 0.25, 0.5, 0.25)), or ONE axis alone, which is the readings — lollipop(x: #sample.score) stands a stem of height 3 at every value that occurs three times, a tally by distinct value that invents no grid at all. Which axis carries the readings is the axis the stems stand on; in the paired form a categorical axis decides (nothing is measured along names), and where both axes are numeric orientation does. The stems stand on the baseline, so the value axis reaches it.

Only withxyplane

#Attributes

xImplicitAnimatable
Where the stems stand: numbers, names, or a dataset column (#rolls.face). Paired with y by position; a pair either axis cannot read is dropped whole. Written alone it is the readings instead, and the mark counts them.Can be written as shorthand: lollipop:value
yAnimatable
The values the stems reach, paired with x by position — or, written alone, the readings to be counted, with the counts running out along x.
orientation
verticalhorizontal
Which way the stems run when nothing else says: 'vertical' up from the x axis, 'horizontal' out from the y axis. A categorical axis says it first, and in the readings form the readings' own axis does, so this is read only when two numeric axes leave the question open.
Defaultvertical
coloursAnimatable
Also written: colors, colour, colorColour for each stem and its dot, cycled in order — one colour colours the lot. If fewer colours than stems are given, the list starts again from the first.
Defaultblue
sizeAnimatable
The dot at the stem's end, in the same units a scatter's dots take.
Default6
widthAnimatable
The stem's thickness, as a line's.
Default2
opacityAnimatable
Opacity of the whole mark, 0 to 1.
Default1
show-labelsAnimatable
Also written: labelsWhen true, writes each stem's value beside its dot — clear of it, above for vertical stems and beyond the dot for horizontal ones. Animatable, so a step can fade the numbers in over a picture the reader has already read.
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.

#Allowed in

#Examples

lollipop(
    x: 0, 1, 2, 3
    y: 0.125, 0.375, 0.375, 0.125
)
lollipop(x: #rolls.face)
lollipop(
    x: 0.42, 0.31, 0.19
    y: North, South, East
    show-labels: true
)