add-node ( graph id -- graph' )
Graphviz ยป Graphviz data structures

Prev:add ( graph statement -- graph' )
Next:add-edge ( graph tail head -- graph' )


Vocabulary
graphviz

Inputs
grapha graph or a subgraph
idan object


Outputs
graph'a graph or a subgraph


Word description
Adds a node with the given id to graph. That is,
X add-node

is shorthand for
X <node> add


Examples
USING: accessors graphviz prettyprint sequences ; <graph> "foo" add-node "bar" add-node "baz" add-node statements>> [ id>> . ] each
"foo" "bar" "baz"


USING: accessors graphviz prettyprint sequences ; <graph> 5 <iota> [ add-node ] each statements>> [ id>> . ] each
"0" "1" "2" "3" "4"


See also
add, add-nodes, add-path

Definition

: add-node ( graph id -- graph' ) <node> add ; inline