I use graphviz to draw commands tree. By default it's merging nodes with same name. How to prohibit this? Example: I have a code:
strict digraph 2 {
rankdir=LR;
SHOW_CONFIGURATION -> INTERFACES_eth;
SHOW_CONFIGURATION -> INTERFACES_vlan;
SHOW_CONFIGURATION -> INTERFACES_lag;
SHOW_CONFIGURATION -> INTERFACES_eth -> DESCRIPTION;
SHOW_CONFIGURATION -> INTERFACES_vlan -> DESCRIPTION;
SHOW_CONFIGURATION -> INTERFACES_lag -> DESCRIPTION;
SHOW_CONFIGURATION -> INTERFACES_eth -> IPV4;
SHOW_CONFIGURATION -> INTERFACES_vlan -> IPV4;
SHOW_CONFIGURATION -> INTERFACES_lag -> IPV4;
}
Result of drawing with command dot -Tsvg -o cli_tree.svg SHOW_CONFIGURATION.dot
:
But i need to draw it without merging of same subcommand nodes, like in this image:
.
Please, help me to know how can i draw my graph like so.
By default, graphviz uses the node id as label. If distinct nodes need to have the same label, the label has to be defined explicitely.
I also find it sometimes useful to define first all nodes, then the edges between those nodes.
In this example, the instruction
node[...]
defines default attributes for all new nodes after this instruction.