Helpers

Functions

  • get-alt-text - Read the alt text stored on a plot spec.
  • qnorm - Inverse of the standard-normal cumulative distribution function.
  • resolution - Smallest non-zero gap between unique numeric values in values.

Binning helpers

  • cut-interval - Cut a numeric vector into n equal-width bins.
  • cut-number - Cut a numeric vector into n bins of (approximately) equal count.
  • cut-width - Cut a numeric vector into bins of fixed width.

Formatters

  • format-comma - Shorthand for format-number(big-mark: ",").
  • format-currency - Format a numeric break as currency.
  • format-lower - Lower-case a string break (ASCII letters only).
  • format-number - Format a numeric break with optional thousands separator and decimals.
  • format-percent - Format a numeric break as a percentage.
  • format-scientific - Format a numeric break in scientific notation as Typst math.
  • format-title - Title-case a string break: capitalise the first letter of each space-separated word.
  • format-upper - Upper-case a string break (ASCII letters only).
  • format-wrap - Soft-wrap a long string by inserting a newline at word boundaries.

Summary functions

  • mean - Mean as a degenerate summary (y, ymin: y, ymax: y).
  • mean-cl-boot - Mean with a bootstrap percentile confidence interval.
  • mean-cl-normal - Mean with normal-approximation confidence interval.
  • mean-sd - Mean and standard-deviation band: mean ± multiplier * sd.
  • mean-se - Mean and standard-error band: mean ± multiplier * se.
  • median - Median as a degenerate summary (y, ymin: y, ymax: y).
  • median-hilow - Median plus a central interval covering conf proportion of the data.
  • quantile - Single quantile as a degenerate summary (y, ymin: y, ymax: y).
  • quantiles - Three quantiles packed into the standard summary shape.
  • summarise - Look up a summary helper by name, or invoke a user-supplied callable.
Back to top