Skip to contents

A panel-background element that paints a simulated paper texture behind the data: ruled notebook lines, a graph grid, a dot grid, aged blotches, or a blueprint / chalkboard / kraft ground. Use it as panel.background in ggplot2::theme(), or – more simply – via theme_sketch(paper = ). Everything is drawn as vector primitives, so it reproduces on every device.

Usage

element_sketch_paper(kind = "notebook", ground = NULL, seed = NULL, ...)

Arguments

kind

A paper from sketch_papers().

ground

Optional override for the ground (fill) colour.

seed

Integer seed for the aged blotches.

...

Passed to ggplot2::element_rect().

Value

A ggplot2 theme element carrying an element_sketch_paper subclass.

Examples

library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) +
  geom_sketch_point(seed = 1L) +
  theme_sketch() +
  theme(panel.background = element_sketch_paper("graph"))