Binary decision tree display tool

I am currently working on creating binary decision trees. Many of them. Some of them are stored in XML format, so you can parse them manually if needed.

The tree structure is mostly nested with <NODE> tags. Each node can also have multiple child tags that define the properties of the node.

What I would like to do is display the trees graphically. Vertically or horizontally doesn't matter, but I would like to use a geometrically tree-like layout for example. eg:

alt text

... not the layout commonly used in file system browsers, which is not the best way to display binary trees.

Is there a .NET library or alternatively a standalone tool that does this well?

+2


source to share


3 answers


Have you looked at Graphviz ? There are some language bindings for .Net (see resources ), and it can be output in a variety of formats (so you can view with SVG / HTML / Flex, offline viewers, etc.)



+3


source


GraphViz

The selected answer also recommends graphviz, but does not provide a displayed example; what else the notes below this answer mentions that graphviz is not easy to use for the purpose stated in the question.

I disagree. I am actually using graphviz for this purpose - as a library (via the python bindings provided by pygraphviz) for plotting the output (i.e. the Structure created when running the C4.5 algorithm against the training set). Setting the graph type to a directed graph (digraph is a formal syntax), the graphviz 'SMACOF algorithm gives you a nice tree structure right out of the box.



For example:

alt text http://img205.imageshack.us/img205/9290/btreeingraphviz.png

To create the graph below, I kept the default values ​​for all the "graph" parameters that affect the layout (eg nodeep, ranksep, ratio), except for the "orientation" which I set to "landscape" (the default is " portraits ").

+2


source


I came across a WPF based package at CodeProject:

Graphics Tree Control for WPF

Looks rather simplistic and should cover my needs. Any comments on this?

+1


source







All Articles