Graphviz data structures
Graphviz

Next:Graphviz gallery


To use the graphviz vocabulary, we construct Factor objects that can be converted to data understood by Graphviz (see graphviz.dot).

The following classes are used to represent their equivalent Graphviz structures:
node

edge

subgraph

graph


Several constructor variations exist to make building graphs convenient.

To construct different sorts of graphs:
<graph> ( -- graph )

<digraph> ( -- graph )

<strict-graph> ( -- graph )

<strict-digraph> ( -- graph )


To construct different sorts of subgraphs:
<subgraph> ( id -- subgraph )

<anon> ( -- subgraph )

<cluster> ( id -- subgraph )


To construct nodes and edges:
<node> ( id -- node )

<edge> ( tail head -- edge )


Finally, use the following words to combine these objects into a single graph:
add ( graph statement -- graph' )

add-node ( graph id -- graph' )

add-edge ( graph tail head -- graph' )

add-nodes ( graph nodes -- graph' )

add-path ( graph nodes -- graph' )