Learn R Programming

gooseR (version 0.1.2)

theme_brand: Generate ggplot2 theme from brand configuration

Description

Generate ggplot2 theme from brand configuration

Usage

theme_brand(
  brand = "block",
  variant = "light",
  base_theme = ggplot2::theme_minimal(),
  base_size = NULL
)

Value

A ggplot2 theme object

Arguments

brand

Name of the brand to use

variant

Theme variant ("light", "dark", or NULL for default)

base_theme

Base ggplot2 theme to build upon (default: theme_minimal())

base_size

Base font size (overrides brand config if specified)

Examples

Run this code
if (FALSE) {
library(ggplot2)
# Light theme
ggplot(mtcars, aes(mpg, wt)) +
  geom_point() +
  theme_brand("block", variant = "light")
  
# Dark theme
ggplot(mtcars, aes(mpg, wt)) +
  geom_point() +
  theme_brand("block", variant = "dark")
}

Run the code above in your browser using DataLab