{
# Set theme from default _brand.yml file
old_wd <- getwd()
setwd(tempdir()) # Change to temp directory for example
brand_init()
get_brand_public()
brand_set_ggplot()
# Create a plot - will use the brand theme
library(ggplot2)
ggplot(mtcars, aes(x = mpg, y = wt)) +
geom_point() +
labs(title = "Example Plot with Brand Theme")
# Reset to original theme
brand_reset_ggplot()
setwd(old_wd) # Restore original working directory
}
Run the code above in your browser using DataLab