Learn R Programming

ggsketch (version 2.0.0)

element_sketch_paper: Paper-ground theme element

Description

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, ...)

Value

A ggplot2 theme element carrying an element_sketch_paper subclass.

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().

See Also

Other sketch-paper: paper_grain(), paper_primitives(), paper_spec(), sketch_papers()

Examples

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

Run the code above in your browser using DataLab