theme-sub-plot
Shortcut for plot title, subtitle, caption, and outer margin.
Usage
theme-sub-plot(
title: none,
subtitle: none,
caption: none,
margin: none,
)Parameters
| Parameter | Default | Description |
|---|---|---|
title |
none |
element-text or element-typst for plot-title. |
subtitle |
none |
Same for plot-subtitle. |
caption |
none |
Same for plot-caption. |
margin |
none |
margin record for plot-margin. |
Returns
Theme dictionary with the named plot overrides applied.
Examples
Bold plot title and smaller subtitle via the plot shortcut.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
labs: labs(title: "Series A", subtitle: "y as a linear function of x"),
theme: theme-sub-plot(
title: element-text(weight: "bold"),
subtitle: element-text(size: 9pt),
),
width: 10cm,
height: 6cm,
)