I was wondering how much hassle it would be to include support for the ggrepel functions? Obviously we can manually do this with something like:
update_geom_defaults("text_repel",
list(family = "desired font", color = "desired color"))
---
title: "Example"
output: html_document
---
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(tidyverse)
library(xaringanthemer)
style_mono_accent(
base_color = "#DC322F", # bright red
inverse_background_color = "#002B36", # dark dark blue
inverse_header_color = "#31b09e", # light aqua green
inverse_text_color = "#FFFFFF", # white
title_slide_background_color = "var(--base)",
text_font_google = google_font("Kelly Slab"),
header_font_google = google_font("Oleo Script")
)
data <- tibble(
label = LETTERS[1:5],
x = 1:5,
y = (1:5)^2
)
p_text <- data %>%
ggplot(aes(x = x, y = y, label = label)) +
geom_text() +
theme_xaringan()
p_text
library(ggrepel)
p_repel <- data %>%
ggplot(aes(x = x, y = y, label = label)) +
geom_text_repel() +
theme_xaringan()
p_repel