I am creating a tree from a list ["abc", "abd", "aec", "add", "adcf"] using anytree package of python3. In this tree first character of each list element - a is a root, and subsequently, other characters are added as their children. When I render tree it looks like:
a
├── b
│ ├── c
│ └── d
├── e
│ └── c
└── d
├── d
└── c
└── f
But when I render the tree to picture using to_picture method, the image is -
I don't want the common nodes to be merged, as it is adding unwanted paths to my tree.
解决方案
The node are arranged in graphviz using their id. In your case the graph is generated with just node names and then graphviz created the loop edge as you get it