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
49
votes
6 answers

Family tree layout with Dot/GraphViz

I am trying to draw a family tree with Dot and GraphViz. This is what I currently have: # just graph set-up digraph simpsons { ratio = "auto" mincross = 2.0 # draw some nodes "Abraham" [shape=box, regular=1, color="blue"] ; "Mona" …
BioGeek
  • 21,897
  • 23
  • 83
  • 145
48
votes
1 answer

Rank attribute is confusing to me

Rank attribute on edge has five values "same", "min", "source", "max", "sink". Except "same", I have no idea when to use other values. min \begin{dotpic} rankdir=LR; size="7,5"; node[shape=circle]; C->A; {rank=min;A;B} B->D …
nirvana9235
  • 655
  • 1
  • 5
  • 7
48
votes
1 answer

Graphviz, dot, ortho plots do not respect ports

I am using graphviz and would like to render my graphs with splines = ortho. The problem is that the edges don't respect ports, so it is not possible to analyse the graph. digraph G{ splines= ortho; A [shape = box, label =<
Daniel
  • 561
  • 4
  • 6
46
votes
2 answers

GraphViz Node Placement and Rankdir

I'm having very good luck with graphviz and have been able to make nearly every graph that I need. I'm trying to duplicate this: http://en.wikipedia.org/wiki/File:ICS_Structure.PNG as faithfully as I can. The bottom part of that graph all flows…
simusid
  • 1,854
  • 3
  • 18
  • 26
45
votes
9 answers

Converting dot to png in python

I have a dot file generated from my code and want to render it in my output. For this i have seen on the net that the command is something like this on cmd dot -Tpng InputFile.dot -o OutputFile.png for Graphviz But my problem is that I want to use…
user506710
44
votes
2 answers

Prevent overlapping records using graphviz and neato

I am building a dot file to represent computer hardware and the physical connections to a network switch and displays. I have it looking ok when processed by the dot program but I think I really want it processed by neato to create a more "free…
Chris Williams
  • 493
  • 1
  • 4
  • 6
41
votes
2 answers

Graphviz: how to set 'default' arrow style?

Consider this dot language code: digraph graphname { subgraph clusterA { node [shape=plaintext,style=filled]; 1 -> 2 [arrowhead=normal,arrowtail=dot]; 2 -> 3 -> X2 -> 5; 6; 7; label = "A"; …
sdaau
  • 36,975
  • 46
  • 198
  • 278
38
votes
5 answers

Improve positioning of subscript and superscript on node labels

When using both subscript and superscripts on a node label, is it possible to alter the positioning so that they are directly above each other. Example: digraph G { x11[label=1(1)>]; …
user2957945
  • 2,353
  • 2
  • 21
  • 40
38
votes
3 answers

How to set default node shape to box instead of oval?

I have some long labels in my graph written in dot language. As a result, (the default shape being oval) I have some not very practical thin really long oval in my graph which take much space. I would like to set the default shape to box for all my…
Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169
36
votes
3 answers

Graph is too large for cairo-renderer bitmaps

Im trying to use pyreverse to generate UML images for a project source code. When I run the pyreverse command and specify to generate png images, it runs and then after a while, it shows: dot: graph is too large for cairo-renderer bitmaps. Scaling…
omega
  • 40,311
  • 81
  • 251
  • 474
35
votes
3 answers

How does one define double-lines for edge and node shapes in graphviz dot?

How can edges and nodes be styled using graphviz dot with doubled lines as shown the in the "LEGAL" and "TAX DISC" nodes of the following diagram?
Judge Maygarden
  • 26,961
  • 9
  • 82
  • 99
35
votes
4 answers

Reading DOT files in javascript/d3

Is there a standard way to read and parse DOT graph files in javascript, ideally in way that will work nicely in d3? Currently, the only thing I can think of doing is reading plain text and doing my own parsing. Hopefully this'd be reinventing the…
ajwood
  • 18,227
  • 15
  • 61
  • 104
34
votes
1 answer

How to control subgraphs' layout in dot?

i have a digraph composed of many independant and simple subgraphs of various sizes. dot lays all these subgraphs horizontally, so i end up with a 40000x200 output file, e.g: G1 G2 G3 G.....4 G5 How do i tell dot to layout these subgraphs in both…
Benoît
  • 3,355
  • 2
  • 29
  • 34
33
votes
1 answer

Forcing orthogonal (vertical or horizontal) edges with dot

I would like to force dot displaying only vertical or horizontal edges between nodes. I have found a similar request with the post Family tree layout with Dot/GraphViz, but I am not dealing with trees, so I hope there is a solution without inserting…
nocbos
  • 391
  • 1
  • 4
  • 6
32
votes
1 answer

Graphviz .dot node ordering

I'm building a epsilon NFA to recognize a regular expression using the canonical construction. I'm using subgraphs to group various parts of the regular expression. The * operator is giving me particular trouble since dot has decided to move the…
Michael Conlen
  • 1,959
  • 2
  • 17
  • 19
1
2
3
71 72