[qd_save()] is a light wrapper around [DiagrammeR::export_graph()], which enables exporting high-quality and/or scalable graphics for both print and online. For convenience in computational notebooks like quarto or RMarkdown documents, [qd_save()] also allows the user to embed the image via [knitr::include_graphics()].
Arguments
- graph
A graph object produced by [qd_dag()]
- file_name
A filename (possibly including a path) to which to save the image. File type will be determined by the extension provided (pdf, svg, png, ps). See [DiagrammeR::export_graph()] for details.
- ...
Pass other arguments to [DiagrammeR::render_graph()].
- embed
Defaults to `FALSE`. Automatically set to `TRUE` by [qd_embed()].
- kg
A list allowing the user to set arguments for [knitr::graphics()] (except for `path`).