theme_UC: Various UC themes for use with ggplot charts

View source: R/themes.R

theme_UCR Documentation

Various UC themes for use with ggplot charts

Description

These functions allow you to add University of Cincinnati themes to ggplot graphics using the official UC color system and digital typography fallbacks.

Usage

theme_UC(
  border = TRUE,
  legend_position = c("bottom", "right"),
  legend_hide = FALSE
)

theme_UC_hgrid(border = FALSE, ...)

theme_UC_vgrid(border = FALSE, ...)

theme_UC_nogrid(border = FALSE, ...)

Arguments

border

If FALSE, removes outer border from plot.

legend_position

legend position. "bottom" or "right"

legend_hide

If TRUE, hides legend in final plot.

...

Additional arguments passed into theme_UC

Details

The main theme is theme_UC, while theme_UC_hgrid and theme_UC_vgrid are used for plots that benefit from a single grid direction. theme_UC_nogrid removes all gridlines.

Value

A complete ggplot2 theme object. The exported variants return horizontal-grid, vertical-grid, or no-grid versions of the base theme.

Author(s)

Saannidhya Rawat

Examples


library(ggplot2)

p <- ggplot(
  data = iris,
  mapping = aes(x = Petal.Width, y = Petal.Length, color = Species)
) +
  geom_jitter(size = 1.5) +
  labs(
    x = "Petal Width",
    y = "Petal Length",
    title = "Iris Example",
    subtitle = "Width vs Length by Species",
    caption = "Note: This is a caption"
  ) +
  facet_wrap(~Species)

p + theme_UC()
p + theme_UC_hgrid()
p + theme_UC_vgrid()

Rbearcat documentation built on March 21, 2026, 5:07 p.m.