theme-classic
Classic theme: white panel, axis borders, no gridlines.
Usage
theme-classic(
ink: _tr-ink,
paper: _tr-paper,
accent: rgb("#3366FF"),
..fields,
)Parameters
| Parameter | Default | Description |
|---|---|---|
ink |
_tr-ink |
Foreground colour (axis lines, text). Default: black. |
paper |
_tr-paper |
Background colour. Default: white. |
accent |
rgb("#3366FF") |
Accent colour. Default: rgb("#3366FF"). |
..fields |
Extra overrides forwarded to theme; see its docs for the full catalogue of structured and flat keys. |
Returns
Theme dictionary consumed by plot.
Examples
Classic axis borders with no gridlines.
#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),),
theme: theme-classic(),
width: 10cm,
height: 6cm,
)Switch paper to a tinted background while keeping the classic axis style.
#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),),
theme: theme-classic(paper: rgb("#fff7e6")),
width: 10cm,
height: 6cm,
)Bump the axis title size on top of the classic preset.
#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),),
theme: theme-classic(axis-title: element-text(size: 14pt)),
width: 10cm,
height: 6cm,
)