Nice graphs from class hierarchies?

Brian Kelley bkelley at wi.mit.edu
Wed Jul 18 17:01:20 EDT 2001


markus at kepler.ibp.de wrote:

> Roman Suzi <rnd at onego.ru> writes:
> > Does anyone know any other tool which can help automatically draw graphs
> > (or only trees) with ability to output to PS?
>
> Dot (see http://www.graphviz.org/) is a powerful program that produces
> reasonably beautiful output.

I noticed that there was a perl and tcl interface to graphviz, is anyone
working on a python interface for doing layouts?  If not, I'll step up to the
plate.

If anyone is interested, I also have a python interface to the unix version of
daVinci 2.1 at http://www.informatik.uni-bremen.de/daVinci/

The one redeeming element is that you can write the daVinci graph language
directly in python (the syntax is the same as python syntax) for example from
the tutorial:

>>> g = Graph()
>>> g(l("Node A",n("Module",[a("COLOR","#f31d8b"),
                        a("OBJECT","Node A"),
                        a("_GO","ellipse"),
                        a("FONTFAMILY","helvetica")], ...
        )

You could also build up the graph independently

>>> node = n("Module", [a("COLOR","green")])
>>> g(l(node))

Either of these would create a graphical output in the daVinci window.

Not all the functionality is added but we had it set up so that you could
watch graphs grow and see nodes get deleted.  I'll dig this up from the
archives and place it on the vaults of parnassus if anyone is interested.

Brian Kelley
Whitehead Institute




More information about the Python-list mailing list