Skip to contents

Themes with an off-white paper background and dark brown ink, as a ground for watercolor layers. theme_paper() keeps axes and a light grid. theme_paper_void() removes everything but the paper, which suits maps.

Usage

theme_paper(
  base_size = 11,
  base_family = "",
  paper = "neutral",
  ink = "#4A3B2E",
  texture = 0
)

theme_paper_void(
  base_size = 11,
  base_family = "",
  paper = "neutral",
  ink = "#4A3B2E",
  texture = 0
)

Arguments

base_size

base font size, given in pts.

base_family

base font family

paper

Colour of the paper. Either the name of a built-in paper, "neutral" (an off-white, the default) or "warm" (a yellower off-white), or any other colour.

ink

Colour of text and lines.

texture

Strength of the paper texture, between 0 (flat paper, the default) and 1. A value of 0.05 gives a subtle tooth.

Value

A ggplot2 theme.

Details

By default the paper is flat. Set texture above 0, for example to 0.05, to give it a fine tooth, drawn by element_paper().

A map has a fixed shape, so the paper does not always fill the image. ggplot2::ggsave() fills the remaining space with the colour of the paper. In an R Markdown or Quarto document, set the background colour of the graphics device to the colour of the paper. The built-in papers are "#F4F3ED" (neutral) and "#F4F1E4" (warm).

Examples

library(ggplot2)

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme_paper()


# Warmer, yellower paper
ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme_paper(paper = "warm")


# Paper with a fine tooth
ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme_paper(texture = 0.05)


ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme_paper_void()