<anon> ( -- subgraph )
Graphviz ยป Graphviz data structures

Prev:<subgraph> ( id -- subgraph )
Next:<cluster> ( id -- subgraph )


Vocabulary
graphviz

Inputs
None

Outputs
subgrapha subgraph


Word description
Constructs an empty, anonymous subgraph by automatically generating a (somewhat) unique id.

Notes
Each id has the form "_anonymous_n", where n is a counter incremented by 1 each time an anonymous id is generated (e.g., each time you call <anon> or <graph>). This is also how the Graphviz DOT parser internally handles anonymous graphs and subgraphs.

Thus, while it's possible to manually create a subgraph whose id conflicts with an <anon>'s , in practice it's unlikely to happen by accident.

Examples
Each <anon> will generate a subgraph with a new id, such as:
USING: graphviz prettyprint ; <anon> . <anon> .
T{ subgraph { id "_anonymous_5" } { statements V{ } } } T{ subgraph { id "_anonymous_6" } { statements V{ } } }


More generally, the following should always be the case:
USING: accessors graphviz kernel prettyprint ; <anon> <anon> [ id>> ] same? .
f


See also
subgraph, <subgraph>, <cluster>

Definition