Package 'ggtiger'

Title: Princeton Themes for 'ggplot2'
Description: What the package does (one paragraph).
Authors: Christopher T. Kenny [aut, cre] (ORCID: <https://orcid.org/0000-0002-9386-6860>)
Maintainer: Christopher T. Kenny <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2026-05-31 06:20:32 UTC
Source: https://github.com/christopherkenny/ggtiger

Help Index


Princeton Color Palette

Description

Princeton Color Palette

Usage

princeton

Format

A list of palette::palette vectors

Examples

princeton$core

Scales consistent with Princeton Brand Template

Description

Scales consistent with Princeton Brand Template

Usage

scale_color_princeton_c(palette = "sequential_orange", ...)

scale_fill_princeton_c(
  palette = "sequential_orange",
  na.color = "#5b575d",
  ...
)

scale_color_princeton_b(
  palette = "sequential_orange",
  na.color = "#5b575d",
  ...
)

scale_fill_princeton_b(
  palette = "sequential_orange",
  na.color = "#5b575d",
  ...
)

scale_color_princeton_d(palette = "core", ...)

scale_fill_princeton_d(palette = "core", ...)

scale_colour_princeton_d(palette = "core", ...)

scale_colour_princeton_c(palette = "sequential_orange", ...)

scale_colour_princeton_b(
  palette = "sequential_orange",
  na.color = "#5b575d",
  ...
)

Arguments

palette

Name of the palette to use. See princeton for available palettes.

...

Additional arguments to pass to ggplot2::binned_scale for ⁠_b⁠, ggplot2::continuous_scale for ⁠_c⁠, or ggplot2::discrete_scale for ⁠_d⁠

na.color

Color to use for NA values (only for ⁠_b⁠ scales)

Value

a ggplot scale object

Examples

library(ggplot2)

ggplot(mpg, aes(cty)) +
  geom_density(aes(fill = factor(cyl)), alpha = 0.8) +
  labs(
    title = 'Density plot',
    subtitle = 'City Mileage Grouped by Number of cylinders',
    caption = 'Source: mpg',
    x = 'City Mileage',
    fill = '# Cylinders'
  ) +
  facet_wrap(~ (hwy > 29)) +
  scale_fill_princeton_d() +
  theme_princeton()

A theme based on Princeton University design guidelines

Description

A theme based on Princeton University design guidelines

Usage

theme_princeton(
  princeton_font = TRUE,
  title_family = NULL,
  base_family = NULL,
  ...
)

Arguments

princeton_font

Should Princeton fonts be used if available?

title_family

Font family for titles. It will search locally for fonts

base_family

Font family for base text

...

Additional arguments to pass to ggplot2::theme()

Value

a ggplot2 theme object

Examples

theme_princeton()