(this file is automatically generated from Java source)
Back to book index.

AT&T DOT semi-tutorial

Graphvis from AT&T is a public domain package for drawing graphs.
The DOT utility is used to draw directed attributed graphs from a textual description. In fact, it was used to produce the pictures in this series of tutorials.

Since DOT is used by JDD to visualize all types of graph, we felt it would be important to give some information about the dot support in JDD.

In JDD, each package that uses DOT, has a class named XXXPrinter. For example, there exists a ZDDPrinter and a GraphPrinter.

These classes produce, among others, graphs in DOT format which is then converted to a graphic file by starting the DOT utility from a class in JDD called Dot:

It is important to know that a call to Dot.showDot(file) will remove you textual description file (here 'file') from your system! You can turn this off by the call to Dot.setRemoveDotFile(false);

You can choose from a set of possible file formats, such as EPS and JPEG. For example, Dot.setType( Dot.TYPE_TYPE_PNG) will set the output format to PNG. Furthermore, Dot.scaleable() returns true if the requested format is scalable (such as EPS).

Example: undirected graphs

Here is an example of an undirected graph, taken from Graphviz distribution:

Example: directed graphs

Here is an example of a directed graph, again, taken from Graphviz distribution: