stem
lq.stem(x, y, color=auto, stroke=auto, mark=auto, mark-size=auto, base=0, base-stroke=red, label=none, clip=true, z-index=2)(source)Creates a vertical stem plot.
#let x = lq.linspace(0, 10, num: 30)
#lq.diagram(
lq.stem(
x,
x.map(calc.cos),
color: orange,
mark: "d",
base: -0.25,
base-stroke: black,
)
)
Also see hstem for horizontal stem plots.
x : array
An array of coordinates.
y : array | function
Specifies either an array of coordinates or a function that takes an
x value and returns a corresponding y coordinate. The number of
and coordinates must match.
color : auto | color default: auto
Combined color for line and marks. See also the parameter stem.line
which takes precedence over color, if set.
stroke : auto | stroke default: auto
The line style to use for this plot (takes precedence over stem.color).
mark : auto | none | lq.mark | str default: auto
The mark to use to mark data points. See plot.mark.
mark-size : auto | length default: auto
Size of the marks.
base : int | float default: 0
Defines the coordinate of the base line.
base-stroke : stroke default: red
How to stroke the base line.
label : content default: none
The legend label for this plot. See plot.label.
clip : bool default: true
Whether to clip the plot to the data area. See plot.clip.
z-index : int | float default: 2
Determines the position of this plot in the order of rendered diagram
objects. See plot.z-index.