Add Brand Logo to ggplot2 Plot
brand_add_logo.Rd
Adds a logo from the brand configuration as an annotation to a ggplot2 plot.
Details
This function reads the logo path from the stored brand configuration and creates a ggplot2 annotation layer. The brand configuration must be loaded first using brand_set_ggplot().
The function supports PNG images and requires the 'png' and 'grid' packages.
Examples
if (FALSE) { # \dontrun{
# First set the brand theme to load configuration
brand_set_ggplot()
# Create a plot and add logo
library(ggplot2)
ggplot(mtcars, aes(x = mpg, y = wt)) +
geom_point() +
labs(title = "Example Plot") +
brand_add_logo()
# Customize logo position and size
ggplot(mtcars, aes(x = mpg, y = wt)) +
geom_point() +
labs(title = "Example Plot") +
brand_add_logo(x = 0.1, y = 0.9, size = 0.08)
} # }