Jump to content

DOT (graph description language)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by RJFJR (talk | contribs) at 22:02, 6 February 2005 (external link moved, updated). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

DOT is a plain text graph description language. It's an intuitive and simple way of describing graphs. Dotty is the tool that reads DOT scripts and renders the graphs.

A simple graph example

Following is an example script that describes the bonding structure of an ethane molecule.

A visual rendering of the script by using the tool dotty

graph ethane {
 C_0--H_0 [type=s];
 C_0--H_1 [type=s];
 C_0--H_2 [type=s];
 C_0--C_1 [type=s];
 C_1--H_3 [type=s];
 C_1--H_4 [type=s];
 C_1--H_5 [type=s];
}

See also Graphviz, dotty