scale-distiller

Continuous ColorBrewer colour/fill scale (distiller).

Usage

scale-distiller(
  ..args,
)

Parameters

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

Returns

Deferred scale spec consumed by scales.

Examples

Map a numeric fill through a continuous ColorBrewer ramp.

#let d = range(1, 8).map(i => (x: i, y: i, w: i))
#plot(
  data: d,
  mapping: aes(x: "x", y: "y", fill: "w"),
  layers: (geom-point(size: 5pt),),
  scales: scales(fill: scale-distiller(palette: "Spectral")),
  width: 10cm,
  height: 6cm,
)

Scatter chart of seven diagonal points whose fill runs through a continuous Spectral ColorBrewer ramp.

Scatter chart of seven diagonal points whose fill runs through a continuous Spectral ColorBrewer ramp.

See also

scales, scale-brewer, scale-fermenter.

Back to top