| theme_UC | R Documentation |
These functions allow you to add University of Cincinnati themes to ggplot graphics using the official UC color system and digital typography fallbacks.
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, ...)
border |
If |
legend_position |
legend position. "bottom" or "right" |
legend_hide |
If |
... |
Additional arguments passed into |
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.
A complete ggplot2 theme object. The exported variants return
horizontal-grid, vertical-grid, or no-grid versions of the base theme.
Saannidhya Rawat
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.