scale-colour-continuous
Continuous colour scale mapping a numeric column to stroke colours.
Usage
scale-colour-continuous(
..args,
)Parameters
| Parameter | Default | Description |
|---|---|---|
..args |
Returns
Scale object consumed by plot.
Examples
Default ramp interpolating between the library’s low and high blue stops.
#let d = range(0, 12).map(i => (x: i, y: i, z: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y", colour: "z"),
layers: (geom-point(size: 3pt),),
scales: (scale-colour-continuous(),),
width: 10cm,
height: 6cm,
)Pin limits to clip the trained domain and render extremes at the palette endpoints.
#let d = range(0, 12).map(i => (x: i, y: i, z: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y", colour: "z"),
layers: (geom-point(size: 3pt),),
scales: (scale-colour-continuous(limits: (1, 4)),),
width: 10cm,
height: 6cm,
)See also
scale-colour-viridis-c, scale-colour-discrete, scale-fill-continuous.