into DOT code and invokes Graphviz on the result. path
is the location where you want to save your output, without
a file extension (Graphviz will automatically add one based on format
is the format of your output (e.g., "png"
is the layout engine to use (e.g., "dot"
Essentially, you can think of it as equivalent to running the Graphviz command " dot path -O -T format -K layout
". See https://graphviz.org/content/command-line-invocation
If the Graphviz process encounters an error, its output will be captured and thrown as an output-process-error
Throws an unsupported-encoding
error if graph-encoding
isn't one of utf8
To render a graph G
using circo and save the output to a PNG file, you could write
G "foo" "png" "circo" graphviz
(assuming circo and PNG are supported by your Graphviz installation). This will save the output to the file foo.png