Captures the currently drawn grid scene, converts it to CeTZ commands,
and writes a .typ file.
Usage
grid_to_cetz(
filename = "Rplot.typ",
header = NULL,
footer = NULL,
cetz_version = "0.4.2",
page_width = "auto",
page_height = "auto",
emit_panel_meta = TRUE,
embed_panel_shift = FALSE,
quiet = TRUE,
escape_hash = FALSE
)Examples
grid::grid.newpage()
grid::grid.rect(gp = grid::gpar(fill = "grey95"))
grid::grid.text("Scene exported with grid_to_cetz()")
out <- tempfile(fileext = ".typ")
src <- grid_to_cetz(out)
file.exists(out)
#> [1] TRUE
is.character(src)
#> [1] TRUE