Easiest way to draw tree diagrams?
Question: I want to have a program which generates diagrams for trees, ones looking
pretty much like [this](http://i.imgur.com/P11MX.jpg)

It is to be a part of a project I am working on using C#, but if there is a
way to make a Python or Javascript do it, that be okay as well. Maybe some C#
library, or JavaScript/Python library with parameters I can provide to it ?

The most important thing, regardless of the programming language, is that it
be easy to use.


Answer: You may want to use [pydot](http://code.google.com/p/pydot/), which is an
interface to the [Graphviz](http://www.graphviz.org/) .DOT format
visualization software. As outlined in the Graphviz
[guide](http://www.graphviz.org/pdf/dotguide.pdf), the .DOT format lets you
design graphs similar to the one you posted as well as more much more
sophisticated ones.

Here's an example from the `pydot` doc:

    
    
    import pydot
    graph = pydot.Dot('graphname', graph_type='digraph') 
    subg = pydot.Subgraph('', rank='same') 
    subg.add_node(pydot.Node('a')) 
    graph.add_subgraph(subg) 
    subg.add_node(pydot.Node('b')) 
    subg.add_node(pydot.Node('c'))
    

If you're looking at Javascript instead,
[canviz](http://code.google.com/p/canviz/) is a well-respected library that
allows you to draw .DOT graphs to browser canvases.

