View source: R/create_theme_fun.R
create_theme_fun | R Documentation |
Create a theme functions by using the ggplot2 elements extracted from the Figma file
create_theme_fun(.data)
.data |
Tibble. ggplot2 elements as created by |
A ggplot2 theme function.
data(toy_raw_file_content) library(ggplot2) my_theme <- toy_raw_file_content %>% extract_ggplot_theme() %>% create_theme_fun() ## Not run: ggplot(data = iris) + aes(x = Sepal.Width, fill = Species) + geom_density() + labs(title = "Sepal width of several species of iris", subtitle = "This plot respects the graphic design system defined in Figma", x = "Sepal width", y = "Density", color = "Species") + my_theme() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.