Questions tagged [dot]

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:

enter image description here

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.

1075 questions
21
votes
3 answers

Graphviz DOT arrange Nodes in circles, layout too "compact"

I'm halfway there please see the edit OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes,…
Ivo Wetzel
  • 46,459
  • 16
  • 98
  • 112
20
votes
3 answers

Plotting the Digraph with graphviz in python from DOT file

This is the API reference for graphviz. I could not find any method that generates a directed graph from an existing dot source file. Methods like render and view save in a new file. How can I display a graph from existing dot code?
Riken Shah
  • 3,022
  • 5
  • 29
  • 56
20
votes
1 answer

subscript in DOT/graphviz edge labels

How do you use Graphviz/DOT's HTML features to add a subscript character to an edge label?
HorseloverFat
  • 3,290
  • 5
  • 22
  • 32
19
votes
1 answer

Importing .dot file as subgraph

Is there -- either via a language feature or via a preporcessor -- a possiblity to include external .dot files as subgraphs into another one? I am working on a relatively big graph, though manually maintained, not generated. It would be convenient…
A Sz
  • 984
  • 7
  • 19
19
votes
1 answer

How to force all nodes in the same column in graphviz?

I'm trying to model a certain flow using graphviz, and I can't figure out how to model the following graph to share the same horizontal center digraph exmp { A -> B -> C -> D C -> E [constraint=false] A -> C [style="dotted",…
Davy Landman
  • 15,109
  • 6
  • 49
  • 73
18
votes
2 answers

How to insert mathematical symbols like Greek characters in a Graphviz dot file?

I have an unique problem. I am using dot to represent a graph which is generic in nature. So, instead of using numbers, I was planning to use symbols like greek letters like alpha, beta, etc. I am curious to know how can we label nodes/edges in .dot…
maths-help-seeker
  • 946
  • 1
  • 10
  • 30
18
votes
1 answer

Graphviz installation Ubuntu 14.04

I am trying to create a dot file using JDD project. It requires installation of Graphviz. I tried to install it using console: sudo apt-get install graphviz In that case, although the installation seemed successful, the program did not produce me…
begumgenc
  • 393
  • 1
  • 2
  • 12
18
votes
2 answers

How to avoid overlapping nodes in graphviz?

I am trying to draw a graph with many nodes and edges. However, the graph is becoming too clumsy, with nodes and edges overlapping. I tried (unsuccessfully), the following, all or combinations of these. size = "12.0, 20.0!"; margin = 0.0; len =…
Masroor
  • 886
  • 1
  • 8
  • 23
18
votes
2 answers

How to change Graphviz subgraph rank?

I want subgraph clusterCG to have same rank as 3 (clusterCG schould not contain 3) digraph G{ rankdir = LR; node [shape = none] 1->2->3->4[arrowhead=none] node [shape = ellipse] A->A2->A3; subgraph clusterCG{ shape = rect; rank=same; …
FDSg
  • 391
  • 1
  • 8
  • 17
17
votes
4 answers

sh: dot: command not found + doxygen + Lion

MacOS version: 10.7.2 (Lion) Doxygen version: 1.7.5.1 Graphviz version: 2.29 Doxygen configuration: DOT_PATH = ../../../../Applications/Contents/MacOS/Graphviz HAVE_DOT = YES SHORT_NAMES = YES From the log console, first line it gives a…
Salil
  • 496
  • 1
  • 5
  • 15
17
votes
1 answer

Block diagram layout with dot/graphviz

I'd like to implement the following mockup with dot: So far I've got this much: digraph G { graph [rankdir = LR, splines=ortho] unit [shape=box, width = 2, height = 10]; more_different_unit [shape=box, height=4]; other_unit [shape=box,…
Christoph
  • 1,580
  • 5
  • 17
  • 29
17
votes
2 answers

Increase separation of edges in graphviz

I am creating several UML activity diagrams with dot-graphviz and the edges/arrows (2+) converge in the same point whenever the target shape is a narrowed rectangle (H=0.5, W=0.05). This problem doesn't occur if the target shape is a square (H=0.5,…
Jaime
  • 5,770
  • 4
  • 23
  • 50
17
votes
6 answers

How to parse a DOT file in Python

I have a transducer saved in the form of a DOT file. I can see a graphical representation of the graphs using gvedit, but what if I want to convert the DOT file to an executable transducer, so that I can test the transducer and see what strings it…
Morteza R
  • 2,229
  • 4
  • 20
  • 31
17
votes
1 answer

Graphviz Dot vertical alignment of nodes

I got this dot graph and want the nodes A and D, B and E and C and F to be aligned. Here is the related dot code: digraph{ A B C D E F {rank = same; B; C} {rank = same; E; F} A -> B [label="2", weight=2] A -> C [label="0", style=dashed,…
skappler
  • 722
  • 1
  • 10
  • 26
16
votes
4 answers

doxygen and graphviz doesn't generate map files

I am trying Graphviz and doxygen on a rather large C++ library to generate UML. It generates the .dot files but then says it can't open the .map files. I am running doxygen 1.8.3 and 2.30.1 installed via the msi on Windows 7 64bit. I also manually…
user2632182
  • 161
  • 1
  • 1
  • 3