knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(architekter)
You can use the extract_ggplot_theme()
function to extract the elements of the {ggplot2} theme from a Figma file.
The Figma file is red with the get_figma_file_content()
function. You can see the vignette b - Figma API connection and file extraction for more details.
get_figma_file_content(file_key = "wRqIvMmymzSPuj0sEhnORb", acess_token = Sys.getenv("FIGMA_TOKEN")) %>% extract_ggplot_theme()
rect
, line
or text
)corresp_element_type <- readr::read_rds( system.file("corresp_element_type.rds", package = "architekter")) corresp_element_type %>% head() %>% knitr::kable()
data(toy_raw_file_content) data_design <- toy_raw_file_content %>% raw_to_design_tibble() data_design %>% add_ggplot_theme_type()
data(toy_raw_file_content) toy_raw_file_content %>% raw_to_design_tibble() %>% add_ggplot_theme_type() %>% determine_ggplot_theme_elements()
data(toy_raw_file_content) toy_raw_file_content %>% extract_ggplot_theme()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.