scale-steps2
Binned diverging three-colour gradient colour/fill scale (steps2).
Usage
scale-steps2(
..args,
)Parameters
| Parameter | Default | Description |
|---|---|---|
..args |
Named arguments forwarded to the colour/fill scale (e.g. low, mid, high, midpoint, n-breaks, breaks, name, limits, labels). |
Returns
Deferred scale spec consumed by scales.
Examples
Bin a signed numeric fill into diverging stepped bands.
#let d = range(0, 11).map(i => (x: i, y: i, w: i - 5))
#plot(
data: d,
mapping: aes(x: "x", y: "y", fill: "w"),
layers: (geom-point(size: 5pt),),
scales: scales(fill: scale-steps2(midpoint: 0, n-breaks: 6)),
width: 10cm,
height: 6cm,
)