5

I would like to create a diagram of a binary decision tree. What free tool will make that easy?

2 Answers2

3

I ended up using GraphViz which allows me te specify the tree in its dot language and then generate a visual representation (e.g. gif, jpg) from it.

0

One can use the Mermaid syntax, then use a Mermaid renderer such as https://github.com/mermaid-js/mermaid, https://www.mermaidflow.app/editor or https://mermaid.live/


Example of a binary tree using the Mermaid syntax (from https://jojozhuang.github.io/tutorial/creating-data-structure-diagrams-with-mermaid/):

graph TB;
    A((1))-->B((2))
    A-->C((3));
    B-->E((4))
    B-->F((5))
    C-->H((6))
    C-->I((7))

Example of rendering with https://mermaid.live/:

enter image description here

Example of rendering with https://www.mermaidflow.app/editor:

enter image description here

Franck Dernoncourt
  • 24,246
  • 64
  • 231
  • 400