Latest Posts »
Latest Comments »
Popular Posts »

Layout with Graphviz

Written by Barns on June 22, 2008 – 9:06 pm

Writing code to draw graphs rather than using a tool such as Visio sounds like a dream come true, but it comes at a price. Graphviz is a nifty tool which does just this. In this sense, I refer to real graphs, those which have nodes and edges connect nodes together.

Conceptually, and practically, it works pretty well, but its layout engine does not always produce something visually appealing, or simple. It tool a wile to discover how to force it to draw nodes in a specific order. It turns out that you connect them with an edge. Sounds silly to add unwanted edges, but you can tell Grahviz that these nodes are invisible. This allows the problem to be solved.

In practice, it still takes forever to do, as it really is a trial and error process. Despite this, it still produces very nice graphics. Unfortunately it cant produce EPS out of the box, but it will create PostScript. If you use the “ps” type (rather than the “ps2″ type) it is a simple matter of running ps2epsi on it.


Tags: , ,
Posted in Linux, Masters | No Comments »