kayjan / bigtree

Tree Implementation and Methods for Python, integrated with list, dictionary, pandas and polars DataFrame.

Home Page:https://bigtree.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree with arrows that are at 180 degrees and 90 degree angles

anirudhtomer opened this issue · comments

Is there a possibility to have arrows that are at 180 degrees and 90 degrees rather than the current tilted ones?
Something like this?
Tree with arrows at 180 and 90 degrees

If not available currently, how can we change the code to enable this?

Thank you.

Hi, which function are you referring to? There are two functions that are able to export tree to diagram: tree_to_dot and tree_to_mermaid.

Thank you for the reply. We are using tree_to_dot.

Thanks for the clarification, tree_to_dot utilizes the pydot package / Graphviz module for rendering.

What you're looking for is to feed in an additional attribute into the pydot.Edge function which can be achieved via tree_to_dot function with the edge_attr parameter. However, looking at the pydot Documentation, they don't seem to have any attribute that sets the edge type/style in this manner.

Alternatively, you can explore tree_to_mermaid function with the parameter line_shape="stepAfter" to achieve the look you want such as,

Screenshot 2023-10-02 at 11 41 07 PM

Photo is captured on the Mermaid live editor.