save_dot {dtrackr}R Documentation

Save DOT content to a file

Description

Convert a digraph in dot format to SVG and save it to a range of output file types

Usage

save_dot(
  dot,
  filename,
  size = std_size$half,
  maxWidth = size$width,
  maxHeight = size$height,
  formats = c("dot", "png", "pdf", "svg"),
  landscape = size$rot != 0,
  ...
)

Arguments

dot

a graphviz dot string

filename

the full path of the file name (minus extension for multiple formats)

size

a named list with 3 elements, length and width in inches and rotation. A predefined set of standard sizes are available in the std_size object.

maxWidth

a width (on the paper) in inches if size is not defined

maxHeight

a height (on the paper) in inches if size is not defined

formats

some of pdf,dot,svg,png,ps

landscape

rotate the output by 270 degrees into a landscape format. maxWidth and maxHeight still apply and refer to the paper width to fit the flowchart into after rotation. (you might need to flip width and height)

...

ignored

Value

a list with items paths with the absolute paths of the saved files as a named list, and svg as the SVG string of the rendered dot file.

Examples

save_dot("digraph {A->B}",tempfile())

[Package dtrackr version 0.4.4 Index]