scale-linetype-continuous
Continuous linetype scale: alias of scale-linetype-binned with the default bin count. Provided as an explicit-name alias.
Usage
scale-linetype-continuous(
name: none,
palette: auto,
limits: none,
oob: "drop",
labels: auto,
)Parameters
| Parameter | Default | Description |
|---|---|---|
name |
none |
Legend title. |
palette |
auto |
Array of dash keywords, or auto. |
limits |
none |
Continuous (lo, hi) pair, or none. |
oob |
"drop" |
Out-of-range policy: "drop" (default) removes rows whose value falls outside limits; "squish" clamps continuous values to the nearest endpoint. |
labels |
auto |
Array of legend labels, or auto. |
Returns
Scale object consumed by plot.
Examples
Map a numeric column onto a dash interpolation across four default bins.
#let d = (
(x: 1, y: 1, q: 1, g: "a"), (x: 2, y: 2, q: 1, g: "a"),
(x: 3, y: 3, q: 1, g: "a"), (x: 4, y: 4, q: 1, g: "a"),
(x: 1, y: 2, q: 4, g: "b"), (x: 2, y: 3, q: 4, g: "b"),
(x: 3, y: 4, q: 4, g: "b"), (x: 4, y: 5, q: 4, g: "b"),
(x: 1, y: 3, q: 7, g: "c"), (x: 2, y: 4, q: 7, g: "c"),
(x: 3, y: 5, q: 7, g: "c"), (x: 4, y: 6, q: 7, g: "c"),
(x: 1, y: 4, q: 10, g: "d"), (x: 2, y: 5, q: 10, g: "d"),
(x: 3, y: 6, q: 10, g: "d"), (x: 4, y: 7, q: 10, g: "d"),
)
#plot(
data: d,
mapping: aes(x: "x", y: "y", linetype: "q", group: "g"),
layers: (geom-line(stroke: 1pt),),
scales: (scale-linetype-continuous(),),
width: 10cm,
height: 6cm,
)