draw-key-point
Draw-key returning a small filled circle.
Used by point and jitter geoms.
Usage
draw-key-point()Returns
Draw-key dictionary consumed by the legend renderer.
Examples
Force the point glyph in the legend (the default for points).
#let d = (
(x: 1, y: 1, g: "a"),
(x: 2, y: 2, g: "b"),
)
#plot(
data: d,
mapping: aes(x: "x", y: "y", fill: "g"),
layers: (geom-point(size: 3pt, key: draw-key-point()),),
width: 8cm,
height: 5cm,
)Use the point glyph on a layer that would otherwise default to a different shape, like a line layered over points.
#let d = (
(x: 1, y: 1, g: "a"), (x: 2, y: 2, g: "a"),
(x: 1, y: 3, g: "b"), (x: 2, y: 1, g: "b"),
)
#plot(
data: d,
mapping: aes(x: "x", y: "y", colour: "g"),
layers: (geom-line(key: draw-key-point()),),
width: 8cm,
height: 5cm,
)See also
draw-key-line, draw-key-rect, draw-key-path, draw-key-blank.