theme-linedraw

Linedraw theme: white panel, strong black axes, very faint grid.

Usage

theme-linedraw(
  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

Strong black border around a white panel with faint grid.

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

Scatter plot of y against x on a white panel ringed by a heavy black axis frame with very faint grid lines.

Scatter plot of y against x on a white panel ringed by a heavy black axis frame with very faint grid lines.

Switch ink to a softer hue for a less stark publication look while keeping the heavy axis frame.

#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-linedraw(ink: rgb("#2c3e50")),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the linedraw theme with dark navy ink softening the heavy axis frame for publication.

Scatter plot of y against x on the linedraw theme with dark navy ink softening the heavy axis frame for publication.

Rotate axis tick labels on top of the linedraw 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-linedraw(axis-text: element-text(angle: 30deg)),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the linedraw theme with axis tick labels rotated 30 degrees beneath the heavy frame.

Scatter plot of y against x on the linedraw theme with axis tick labels rotated 30 degrees beneath the heavy frame.

See also

theme-grey, theme-minimal, theme-classic, theme-bw, theme-void, theme.

Back to top