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

Choice of node shape

anirudhtomer opened this issue · comments

Is there a possibility to have node shapes that are not round and ellipse, but rather rectangular and rhombus. We are trying to generate a decision tree where different nodes should have different shapes based on their type, e.g., decision nodes to be a rhombus, some others rectangular and some others circles/ellipses. If it is not currently implemented, how can I extend your code to enable these?

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. Both functions support alternative node shapes as parameter argument (shape applies to all nodes). There are also examples on how to apply custom node shapes (shape applies to some nodes).

Do refer to the documentation here.

Thank you. That is what I was looking for.