Dotex v0.1.0 Dotex.Graph

The base struct for storing the attributes, nodes and connections of a Graphviz graph

Summary

Functions

Create a connection between a node and one or more nodes

Add a node to a graph

Create a new Graphviz graph

Functions

add_connection(graph, node, dstnode, params \\ [])

Create a connection between a node and one or more nodes

Attributes

  • graph - the graph to operate on
  • srcnode - a Dotex.Node that is the source of the connection
  • dstnode - a single Dotex.Node or list of Dotex.Node to add a connection to
  • params - optional paramater for the connection (eg. [color: “blue”]
add_node(graph, node)

Add a node to a graph

Attributes

  • graph - the graph to operate on
  • node - the node being added to the graph
new(attributes)

Create a new Graphviz graph

Arguments

  • type - “graph” or “digraph”
  • id - (optional) the id of the graph
  • attributes - (optional) list of attributes for the graph (eg. [rankdir: “LR”]