DOT is both a mathematical graph description language and a particular graph rendering engine (dot). As a graph description language, DOT uses a simple plain text mapping syntax to describe the relationships between nodes and edges (e.g. `nodeA -> nodeB`) , and a plain text markup syntax to add style, annotations, and constrain the rendered layout.
DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use.
The following Example:
digraph g{
// basic: A,B,C,D (this is a comment)
A -> B -> C -> D
D -> C
B -> D
// node and edge markups
nodeA [shape=diamond, color=red, style=dashed, label="Warehouse 259"]
nodeA -> nodeB [color=blue, style=solid, label="MWF schedule, 2 ton capacity"]
}
will render to this graph:
DOT graphs are typically files that end with the .gv
(preferred) or .dot
extension.
Most uses of DOT are either by GraphViz programs or by software that uses GraphViz internally.