format-title
Title-case a string break: capitalise the first letter of each space-separated word.
Usage
format-title()Returns
A closure value => string.
Examples
Title-case discrete x-axis levels without renaming the underlying data.
#let d = ((g: "alpha", y: 4), (g: "beta", y: 7), (g: "gamma", y: 3))
#plot(
data: d,
mapping: aes(x: "g", y: "y"),
layers: (geom-col(),),
scales: (scale-x-discrete(labels: format-title()),),
width: 10cm,
height: 6cm,
)