scale-fill-distiller

Continuous ColorBrewer fill scale.

Fill counterpart of scale-colour-distiller.

Usage

scale-fill-distiller(
  ..args,
)

Parameters

Parameter Default Description
..args

Returns

Scale object consumed by plot.

Examples

Spectral palette interpolated across a continuous swatch via geom-rect.

#let d = range(0, 16).map(i => (
  xmin: i, xmax: i + 1, ymin: 0, ymax: 1, z: i,
))
#plot(
  data: d,
  mapping: aes(xmin: "xmin", xmax: "xmax", ymin: "ymin", ymax: "ymax", fill: "z"),
  layers: (geom-rect(),),
  scales: (scale-fill-distiller(palette: "Spectral"),),
  guides: guides(fill: guide-none()),
  width: 10cm,
  height: 1cm,
)

Colour-bar swatch of sixteen rectangles displaying the ColorBrewer Spectral palette lifted into a smooth continuous fill ramp from red through yellow to blue.

Colour-bar swatch of sixteen rectangles displaying the ColorBrewer Spectral palette lifted into a smooth continuous fill ramp from red through yellow to blue.

See also

scale-colour-distiller, scale-fill-gradientn, scale-fill-brewer.

Back to top