blueprint v0.1.0 Blueprint.Plot.Graph

Convenient functions for building simple node dependency graphs.

Link to this section Summary

Functions

Write the DOT graph to a file

Convert a node graph into a DOT graph

Link to this section Types

Link to this type graph_node()
graph_node() :: any()
Link to this type meta()
meta() :: any()

Link to this section Functions

Link to this function save!(dot, path \\ "graph.dot")
save!(String.t(), String.t()) :: :ok | no_return()

Write the DOT graph to a file.

Link to this function to_dot(graph, opts \\ [])
to_dot([{node(), node()} | {node(), node(), meta()}], keyword()) :: String.t()

Convert a node graph into a DOT graph.

Options can be provided to change the resulting graph. These options are:

  • :labeler - A function of type (any -> String.t), where the node is passed to the function and is expected to receive a string that will be used on the graph to label it as a result.
  • :styler - A function of type (node_element | connection_element -> keyword()) where node_element is of type { :node, node } and connection_element is of type { :connection, connection }.