theme-void
Void theme: no axes, no grid, no panel background.
Usage
theme-void(
ink: _tr-ink,
paper: auto,
accent: rgb("#3366FF"),
..fields,
)Parameters
| Parameter | Default | Description |
|---|---|---|
ink |
_tr-ink |
Foreground colour. Default: black. |
paper |
auto |
Plot canvas fill. Default: transparent (no canvas drawn). Pass an explicit colour to paint the canvas behind the otherwise-blank panel. |
accent |
rgb("#3366FF") |
Accent colour driving layer defaults like geom-smooth’s stroke. 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
Strip away axes, grid, and panel background entirely.
#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-void(),
width: 10cm,
height: 6cm,
)Useful behind a custom annotated figure where axes would be visual noise; pass an explicit paper for a solid background.
#let d = range(0, 12).map(i => (
x: calc.cos(i * 0.5), y: calc.sin(i * 0.5), t: i,
))
#plot(
data: d,
mapping: aes(x: "x", y: "y", colour: "t"),
layers: (geom-path(stroke: 1.4pt),),
theme: theme-void(paper: rgb("#fff7e6")),
width: 10cm,
height: 6cm,
)Restore a faint panel background while keeping the void preset’s stripped-down axes.
#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-void(panel-background: element-rect(fill: rgb("#f7f0e7"))),
width: 10cm,
height: 6cm,
)