scale-fill-steps

Binned two-stop fill gradient.

Fill counterpart of scale-colour-steps.

Usage

scale-fill-steps(
  ..args,
)

Parameters

Parameter Default Description
..args

Returns

Scale object consumed by plot.

Examples

Five-bin discretised fill ramp shown as a 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-steps(n-breaks: 5),),
  guides: guides(fill: guide-none()),
  width: 10cm,
  height: 1cm,
)

Colour-bar swatch of sixteen rectangles displaying the default two-stop fill ramp cut into five stepped blue bands from dark navy on the left to light sky-blue on the right.

Colour-bar swatch of sixteen rectangles displaying the default two-stop fill ramp cut into five stepped blue bands from dark navy on the left to light sky-blue on the right.

See also

scale-colour-steps, scale-fill-steps2, scale-fill-stepsn.

Back to top