Closed villmow closed 3 years ago
Hi @villmow,
Thanks for liking binarytree and this is pretty cool work!
I have received a few requests for graphviz integration in the past. Right now, however, because of my schedule, I've paused all feature work on my open source projects (PR submissions will also be very slow). If you want to share your work with more people I encourage you to publish your own library built on top of binarytree. I will keep this open for any future updates.
Instead of implementing this method from scratch, I've decided to use python-graphviz instead (it has many more features) in version 6.0.0. Please see the documentation for more details!
First of all nice package, thanks for that! I just wanted to visualize a binary tree with Graphviz thats why I adapted this utility function from the treelib package, maybe it fits somewhere in your library. As I wanted to have string values for nodes and that doesn't work with your package I supplied an optional
id2name
dictionary, which stores the mapping.Example Use
Use it like this
After installing graphviz, you can plot the tree with the following command:
which will result in the following image: