scale-viridis-b

Binned viridis colour/fill scale.

Usage

scale-viridis-b(
  ..args,
)

Parameters

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

Returns

Deferred scale spec consumed by scales.

Examples

Bin a numeric column onto a stepped viridis fill.

#let d = range(0, 12).map(i => (x: i, y: i, w: i + 1))
#plot(
  data: d,
  mapping: aes(x: "x", y: "y", fill: "w"),
  layers: (geom-point(size: 5pt),),
  scales: scales(fill: scale-viridis-b(n-breaks: 4)),
  width: 10cm,
  height: 6cm,
)

Scatter chart of twelve diagonal points whose fill steps through four binned viridis bands.

Scatter chart of twelve diagonal points whose fill steps through four binned viridis bands.

See also

scales, scale-viridis-c, scale-steps.

Back to top