knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  dev = "svg"
)

ggpmthemes

R build status

Simple R package with custom ggplot2 themes.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("PMassicotte/ggpmthemes")

Examples

Theme Poppins

library(ggpmthemes)
library(ggplot2)

p <- ggplot(ToothGrowth, aes(x = dose, y = len, group = dose)) +
  geom_boxplot(aes(fill = factor(dose))) +
  facet_wrap(~supp)

p +
  theme_poppins()

p +
  theme_exo2()

Works also with geom_text()

p <- ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars))) +
  geom_text(check_overlap = TRUE)

p +
  theme_poppins()

p +
  theme_exo()

Scientific format

ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars))) +
  geom_point() +
  scale_x_continuous(labels = scientific_10x)

Please note that the 'ggpmthemes' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



PMassicotte/ggpmthemes documentation built on June 18, 2022, 7:12 a.m.