September 13, 2004
Graphviz Introduction
There is a good introduction to graphviz, the graph drawing tool from AT&T available at the Linux Journal web site.
Graphviz provides a general tool to visualize objects that are otherwise hard to see. One example of how graphviz can be used is in visualizing a forest which is a compact representation of a whole bunch of trees. It is compact because it does not duplicate common sub-trees. The figure below is one such forest that stores four simple trees (click on the figure to get a larger view).
It is a somewhat unorthodox view of a forest because entire (sub)trees are shown at each node instead of just non-terminals, so the forest as shown has some duplicated nodes (e.g. the four original trees) but it looks prettier. The figure above was produced by running some simple Perl code that I hacked together to convert a set of trees into a forest and store it in a format that can be read by graphviz tools.
For the original source code and binary distributions go to the Official GraphViz Web Site and the GraphViz Development Web Site. There is a very sophisticated native port to MacOSX.
There is a convenient Perl interface to graphviz available from CPAN and there is a C++ STL-style interface to graphviz that is part of the Boost library. There's even a MATLAB interface to graphviz.
Posted by anoop at September 13, 2004 10:56 AM