Skip to contents

Update the "text" and "label" geom defaults. Note all other text is controlled by the theme.

Usage

set_font_defaults(
  ...,
  colour = "#121B24FF",
  fill = "#FFFFFFFF",
  size = 11/2.835052,
  family = ""
)

Arguments

...

Provided to require argument naming, support trailing commas etc.

colour

A hex code.

fill

A hex code.

size

A size.

family

A family.

Examples

library(ggplot2)
library(dplyr)
library(palmerpenguins)

set_blanket(theme = dark_mode_r())
set_font_defaults(colour = darkness[1])
set_reference_defaults(colour = darkness[1])

penguins |>
  gg_point(
    x = flipper_length_mm,
    y = body_mass_g,
    x_breaks_n = 4,
  ) +
  geom_vline(xintercept = 200) +
  annotate("text", x = I(0.25), y = I(0.75), label = "Here")
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).