format-upper

Upper-case a string break (ASCII letters only).

Usage

format-upper()

Returns

A closure value => string.

Examples

Upper-case the discrete x-axis tick labels via the closure.

#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-upper()),),
  width: 10cm,
  height: 6cm,
)

Bar chart of three groups with discrete x-axis tick labels upper-cased to ALPHA, BETA, GAMMA via format-upper.

Bar chart of three groups with discrete x-axis tick labels upper-cased to ALPHA, BETA, GAMMA via format-upper.

See also

format-lower, format-title.

Back to top