digraphviz v0.1.0 Digraphviz View Source

Digraphviz — converts Erlang :digraph to graph description in .dot language.

Link to this section Summary

Functions

Converts :digraph to iodata which contains .dot

Link to this section Functions

Link to this function convert(digraph, type \\ :digraph, attributes \\ []) View Source
convert(:digraph.new(), :digraph | :graph, Keyword.t()) :: iodata()

Converts :digraph to iodata which contains .dot.

attributes define global attributes for graph, nodes and edges.

  • :graph — graph attributes
  • :node — node attributes
  • edge — edge attributes

Attributes can hold any values, but only keywords will appear in resulting .dot.

For example:

Digraphviz.convert(graph, :digraph, graph: [fontsize: 10], node: [shape: :record], edge: [color: :red])