theme-minimal

Minimal theme: white panel, light grey gridlines, no axis lines.

For the gribouille default (grey panel with white gridlines) use theme-grey.

Usage

theme-minimal(
  ink: _tr-ink,
  paper: auto,
  accent: rgb("#3366FF"),
  ..fields,
)

Parameters

Parameter Default Description
ink _tr-ink Foreground colour (text). 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

Minimal style: faint gridlines, no axis lines or tick marks.

#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-minimal(),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x with faint grey gridlines and no axis lines or tick marks for a minimal style.

Scatter plot of y against x with faint grey gridlines and no axis lines or tick marks for a minimal style.

Pair the minimal theme with a coloured accent for slide decks where you still want a brand colour.

#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-minimal(accent: rgb("#1f77b4")),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the minimal theme with a steel-blue accent recolouring data ink for branded slides.

Scatter plot of y against x on the minimal theme with a steel-blue accent recolouring data ink for branded slides.

Paint the canvas behind the otherwise-blank panel by passing an explicit paper colour.

#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-minimal(paper: rgb("#fff7e6")),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the minimal theme with a warm cream canvas painted behind the otherwise-blank panel.

Scatter plot of y against x on the minimal theme with a warm cream canvas painted behind the otherwise-blank panel.

Spot-override individual elements without rebuilding the theme from scratch.

#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-minimal(axis-title: element-text(size: 14pt)),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the minimal theme with axis titles rendered in a larger 14pt font via a spot override.

Scatter plot of y against x on the minimal theme with axis titles rendered in a larger 14pt font via a spot override.

See also

theme-grey, theme-classic, theme-void, theme.

Back to top