scale-okabe-ito

Discrete Okabe-Ito colourblind-safe colour/fill scale.

Usage

scale-okabe-ito(
  ..args,
)

Parameters

Parameter Default Description
..args Named arguments forwarded to the colour/fill scale (e.g. name, limits, labels).

Returns

Deferred scale spec consumed by scales.

Examples

Colour groups with the colourblind-safe Okabe-Ito palette.

#let d = ((x: 1, y: 1, g: "a"), (x: 2, y: 2, g: "b"), (x: 3, y: 3, g: "c"))
#plot(
  data: d,
  mapping: aes(x: "x", y: "y", colour: "g"),
  layers: (geom-point(size: 3pt),),
  scales: scales(colour: scale-okabe-ito()),
  width: 10cm,
  height: 6cm,
)

Scatter chart of three points coloured by group with the Okabe-Ito colourblind-safe palette.

Scatter chart of three points coloured by group with the Okabe-Ito colourblind-safe palette.

See also

scales, scale-brewer.

Back to top