README.md

bptheme

R-CMD-check

The goal of bptheme is to make effortless the application of Blueprint’s current corporate graphic standards to your ggplots.

Installation

You can install the development version of bptheme from GitHub with:

# install.packages("devtools")
devtools::install_github("context-dependent/bptheme")

Example Usage

library(bptheme)
library(bpscales)
library(ggplot2)
library(palmerpenguins)

d <- penguins

d |>
  ggplot(aes(bill_length_mm, bill_depth_mm)) +
  geom_point(aes(fill = species), shape = 21, size = 3) +
  labs(
    title = "Penguin Face Analytics",
    subtitle = "Bill Depth ~ Bill Length + Species",
    x = "Bill Length (mm)",
    y = "Bill Depth (mm)",
    fill = "Species"
  ) +
  theme_blueprint() +
  scale_fill_blueprint(
    discrete = TRUE,
    type = "multi", option = "spectrum",
    begin = .25, end = .75
  )
#> Warning: Removed 2 rows containing missing values (`geom_point()`).



context-dependent/bptheme documentation built on May 4, 2023, 6:21 p.m.