HOME

TheInfoList



OR:

DOT is a
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discret ...
description language, developed as a part of the
Graphviz Graphviz (short for ''Graph Visualization Software'') is a package of open-source software, open-source tools initiated by AT&T Labs, AT&T Labs Research for Graph drawing, drawing graph (discrete mathematics), graphs (as in Vertex (graph theory ...
project. DOT graphs are typically stored as files with the .gv or .dot
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (for example, .txt, .mp3, .exe) that indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
.gv is preferred, to avoid confusion with the .dot extension used by versions of
Microsoft Word Microsoft Word is a word processor program, word processing program developed by Microsoft. It was first released on October 25, 1983, under the name Multi-Tool Word for Xenix systems. Subsequent versions were later written for several other platf ...
before 2007. dot is also the name of the main program to process DOT files in the Graphviz package. Various programs can process DOT files. Some, such as ''dot'', ''neato'', ''twopi'', ''circo'', ''fdp'', and ''sfdp'', can read a DOT file and render it in graphical form. Others, such as ''gvpr'', ''gc'', ''acyclic'', ''ccomps'', ''sccmap'', and ''tred'', read DOT files and perform calculations on the represented graph. Finally, others, such as ''lefty'', ''dotty'', and ''grappa'', provide an interactive interface. The GVedit tool combines a text editor and a non-interactive viewer. Most programs are part of the Graphviz package or use it internally. DOT is historically an acronym for "DAG of tomorrow", as the successor to a DAG format and a ''dag'' program which handled only
directed acyclic graphs In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ...
.


Syntax


Graph types


Undirected graphs

At its simplest, DOT can be used to describe an
undirected graph In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called '' vertices'' (also call ...
. An undirected graph shows simple relations between objects, such as reciprocal friendship between people. The graph keyword is used to begin a new graph, and nodes are described within curly braces. A double-hyphen (--) is used to show relations between the nodes. // The graph name and the semicolons are optional graph graphname


Directed graphs

Similar to undirected graphs, DOT can describe directed graphs, such as
flowchart A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task. The flowchart shows the steps as boxes of v ...
s and dependency
tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only ...
s. The syntax is the same as for undirected graphs, except the digraph keyword is used to begin the graph, and an arrow (->) is used to show relationships between nodes. digraph graphname


Attributes

Various attributes can be applied to graphs, nodes and edges in DOT files. These attributes can control aspects such as color, shape, and line styles. For nodes and edges, one or more attribute–value pairs are placed in square brackets [] after a statement and before the semicolon (which is optional). Graph attributes are specified as direct attribute–value pairs under the graph element, where multiple attributes are separated by a comma or using multiple sets of square brackets, while node attributes are placed after a statement containing only the name of the node, but not the relations between the dots. graph graphname HTML-like labels are supported, although initially Graphviz did not handle them.


Comments

DOT supports C and C++ style single line and multiple line comments. In addition, it ignores lines with a number sign symbol # as their first character, like many interpreted languages.


Layout programs

] The DOT language defines a graph, but does not provide facilities for rendering the graph. There are several programs that can be used to render, view, and manipulate graphs in the DOT language:


General

*
Graphviz Graphviz (short for ''Graph Visualization Software'') is a package of open-source software, open-source tools initiated by AT&T Labs, AT&T Labs Research for Graph drawing, drawing graph (discrete mathematics), graphs (as in Vertex (graph theory ...
– a collection of CLI utilities and libraries to manipulate and render graphs into different formats like Scalable Vector Graphics, SVG,
PDF Portable document format (PDF), standardized as ISO 32000, is a file format developed by Adobe Inc., Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, computer hardware, ...
, PNG etc. **dot – CLI tool for conversion between and other formats


JavaScript

* Canviza
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
library for rendering DOT files * d3-graphviza
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
library based on Viz.js and
D3.js D3.js (also known as D3, short for Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It makes use of Scalable Vector Graphics (SVG), HTML5, and Cascading Style Sheets (CSS) stan ...
that renders DOT graphs and supports animated transitions between graphs and interactive graph manipulation * Vis.jsa
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
library that accept DOT as input for network graphs. *Viz.js – a JavaScript port of Graphviz that provides a simple wrapper for using it in the browser. * hpcc-js/wasm Graphviza fast WASM library for Graphviz similar to Viz.js


Java

* Gephian interactive visualization and exploration platform for all kinds of networks and complex systems, dynamic and hierarchical graphs * Grappaa partial port of Graphviz to
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
* graphviz-javaan open source partial port of Graphviz to
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
available from github.com * ZGRViewera DOT viewer


Other

* Beluginga Python- &
Google Cloud Platform Google Cloud Platform (GCP) is a suite of cloud computing services offered by Google that provides a series of modular cloud services including computing, Computer data storage, data storage, Data analysis, data analytics, and machine learnin ...
-based viewer of DOT and Beluga extensions * Delineatea
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
application for
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
than can edit fully-featured DOT graph with interactive preview, and export as PNG, SVG, or JPEG * dot2texa program to convert files from DOT to PGF/TikZ or PSTricks, both of which are rendered in
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well. In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
* OmniGrafflea digital illustration application for
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
that can import a subset of DOT, producing an editable document (but the result cannot be exported back to DOT) *
Tulip Tulips are spring-blooming perennial herbaceous bulbiferous geophytes in the ''Tulipa'' genus. Their flowers are usually large, showy, and brightly coloured, generally red, orange, pink, yellow, or white. They often have a different colour ...
a
software framework In computer programming, a software framework is a software abstraction that provides generic functionality which developers can extend with custom code to create applications. It establishes a standard foundation for building and deploying soft ...
in C++ that can import DOT files for analysis * VizierFXan
Apache Flex Apache Flex, formerly Adobe Flex, is a software development kit (SDK) for the development and deployment of cross-platform rich web applications based on the Adobe Flash platform. Initially developed by Macromedia and then acquired by Adobe System ...
graph rendering library in
ActionScript ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (mean ...


Notes


See also


External links


DOT tutorial and specification
*
Drawing graphs with dot
*

*

*
Gallery of examples

Graphviz Online
instant conversion and visualization of DOT descriptions



o
tree2dot
convert
Lisp programming language Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation. Originally specified in the late 1950s, ...
-like program trees to DOT language (designed for use with
genetic programming Genetic programming (GP) is an evolutionary algorithm, an artificial intelligence technique mimicking natural evolution, which operates on a population of programs. It applies the genetic operators selection (evolutionary algorithm), selection a ...
) {{Graph representations Mathematical software Graph description languages Graph drawing