scale-fill-okabe-ito
Discrete Okabe-Ito colour-vision-deficiency-safe fill scale.
Fill counterpart of scale-colour-okabe-ito. Also the library default for unmapped discrete fill aesthetics.
Usage
scale-fill-okabe-ito(
name,
limits,
oob,
labels,
)Parameters
| Parameter | Default | Description |
|---|---|---|
name |
Legend title. Overrides any name set via labs when both are present. |
|
limits |
Array of level names controlling order and inclusion, or none. |
|
oob |
Out-of-range policy: "drop" (default) removes rows whose value falls outside limits; "squish" clamps continuous values to the nearest endpoint. |
|
labels |
Array of legend labels aligned with limits, or auto. |
Returns
Scale object consumed by plot.
Examples
Categorical bars filled with the Okabe-Ito palette.
#let d = (
(grp: "a", y: 1),
(grp: "b", y: 2),
(grp: "c", y: 3),
)
#plot(
data: d,
mapping: aes(x: "grp", y: "y", fill: "grp"),
layers: (geom-col(),),
scales: (scale-fill-okabe-ito(),),
width: 10cm,
height: 6cm,
)See also
scale-colour-okabe-ito, scale-fill-brewer, scale-fill-discrete.