Themes: Built-in themes • theme.hadleyUsed to look like a default...

ThemesR Documentation

Built-in themes
  • theme.hadleyUsed to look like a default ggplot2 graph

  • theme.packersGet a Green Bay Packers football theme

Description

Built-in themes

  • theme.hadleyUsed to look like a default ggplot2 graph

  • theme.packersGet a Green Bay Packers football theme

Examples

ggplotTheme <- theme.hadley
gbTheme <- theme.packers

# Code to get theme:
ggplot_config <- system.file("extdata", "ggplot.yaml", package = "gsplot")

theme.hadley <- gsplot(frame.plot=FALSE, config.file=ggplot_config) %>%
  background_color(col="grey90") %>%
  grid(col = "white", lty = 1) %>%
  axis(side = c(1,2), lwd = 0, lwd.ticks = 1) 
  
packers_config <- system.file("extdata", "packers.yaml", package = "gsplot")

theme.packers <- gsplot(frame.plot=FALSE, config.file=packers_config) %>% 
  background_color(col="#203731") %>%
  grid(col = "gold", lty = 1, lwd=3) %>%
  axis(side = c(1,2), lwd = 0)
  
## Not run: 
save(theme.hadley, theme.packers, file="sysdata.rda")

## End(Not run)

USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.