[add-edge ( tail head -- edge )
Graphviz notation ยป Aliases that resemble DOT code

Prev:[add-node ( id -- node )
Next:[-- ( tail head -- edge )


Vocabulary
graphviz.notation

Inputs
tailan object
headan object


Outputs
edgean edge


Word description
Shorthand for <edge> to be used with ]; and attribute-setting generic words (see Notation for setting Graphviz attributes) so that setting an edge's attributes reads more like the equivalent in the DOT language.

Examples
Instead of writing
<graph> 1 2 <edge> "red" =color add

it looks better to write
<graph> 1 2 [add-edge "red" =color ];

Compare this with the DOT language, where you'd write
graph { 1 -- 2 [ color="red" ]; }


This has the advantage over [-- and [-> of reading nicely for both directed and undirected graphs.

See also
[add-node, [--, [->, [node, [edge, [graph, ];

Definition