add ( graph statement -- graph' ) (original) (raw)
Vocabulary
graphviz
Inputs
Outputs
Word description
Adds an arbitrary object to the statements slot of a graph or subgraph, leaving the updated tuple on the stack. This is the most basic way to construct a graph.
Notes
add does not check the type of statement. You should ensure that graphs and subgraphs only contain instances of:
• | subgraph |
---|---|
• | node |
• | edge |
• | graph-attributes |
• | node-attributes |
• | edge-attributes |
Examples
USING: accessors graphviz prettyprint sequences ; 1 add statements>> [ id>> . ] each
"1"
USING: accessors graphviz prettyprint sequences ; 1 add 2 add statements>> [ id>> . ] each
"1" "2"
USING: accessors classes graphviz prettyprint sequences ; 1 add 2 add 1 2 add statements>> [ class-of . ] each
node node edge
See also
add-node, add-nodes, add-path
Definition