drawtree
drawtree copied to clipboard
siblings nodes' height are not the same?
Hi msbanik,
The library is pretty cool, but I wonder can siblings nodes' height be the same?
For example, code:
from drawtree import draw_level_order
draw_level_order('{3,9,20,1,2,15,17}')
it generates:
3
/ \
/ \
/ \
9 20
/ \ / \
1 2 / \
15 17
Can node 1,2 and node 15,17 be in the same level?
Thank you.
Hi @01joy , Thanks for trying this, I think the algorithm didn't consider the size of the content of each node when drawing. For example draw_level_order('{3,9,20,1,2,5,7}') draws
3
/ \
/ \
/ \
9 20
/ \ / \
1 2 5 7
If you find a way to solve this, open up a pull request :)