theme-grey
Grey theme: light grey panel with white gridlines.
This is the gribouille default theme.
Usage
theme-grey(
ink: _tr-ink,
paper: _tr-paper,
accent: rgb("#3366FF"),
..fields,
)Parameters
| Parameter | Default | Description |
|---|---|---|
ink |
_tr-ink |
Foreground colour (text, axis lines). 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
Library default: light grey panel with white 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-grey(),
width: 10cm,
height: 6cm,
)Override ink and paper for a tinted theme without switching theme function.
#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-grey(ink: rgb("#2c3e50"), paper: rgb("#fdf6e3")),
width: 10cm,
height: 6cm,
)Tweak a single field on top of the preset using a flat key.
#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-grey(panel-background: element-rect(fill: rgb("#f7f0e7"))),
width: 10cm,
height: 6cm,
)