theme_xaringan_set_defaults: Set and Restore ggplot2 geom Defaults

View source: R/ggplot2.R

theme_xaringan_set_defaultsR Documentation

Set and Restore ggplot2 geom Defaults

Description

[Maturing]

Set ggplot2 geom defaults to match theme_xaringan() with theme_xaringan_set_defaults() and restore the standard or previously-set defaults with theme_xaringan_restore_defaults(). By default, theme_xaringan_set_defaults() is run with theme_xaringan() or theme_xaringan_inverse().

Usage

theme_xaringan_set_defaults(
  text_color = NULL,
  background_color = NULL,
  accent_color = text_color,
  accent_secondary_color = accent_color,
  text_font = NULL
)

theme_xaringan_restore_defaults()

Arguments

text_color

Color for text and foreground, inherits from text_color

background_color

Color for background, inherits from background_color

accent_color

Color for titles and accents, inherits from header_color

accent_secondary_color

Color for secondary accents, inherits from text_bold_color

text_font

Font to use for text elements, passed to sysfonts::font_add_google(), if available and text_font_use_google is TRUE. Inherits from text_font_family. Must be a length-one character.

Value

Invisibly returns a list of the current ggplot2 geom defaults

Invisibly returns a list of the current ggplot2 geom defaults

Functions

  • theme_xaringan_restore_defaults(): Restore previous or standard ggplot2 geom defaults.

See Also

Other xaringanthemer ggplot2 themes: theme_xaringan(), theme_xaringan_base(), theme_xaringan_inverse()


xaringanthemer documentation built on Sept. 15, 2024, 5:06 p.m.