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
0
votes
1 answer

Add extra edges to a digraph in Graphviz

I have a .dot digraph which shows a graph as I want (depicting relationship between some tables). I want to add redundant edges to the graph (to represent redundant relationships in the database which exist only to write queries less effortly).…
ABu
  • 10,423
  • 6
  • 52
  • 103
0
votes
2 answers

How to make GraphViz ladder diagram flows straight

The graphviz code below generates a ladder diagram, but flow3 is curved. This only happens when the edge crosses a vertical line. How can I make flow3 straight and horizontal? I tried experimenting with the splines attribute with no success. How…
Steve
  • 1,250
  • 11
  • 25
0
votes
1 answer

How to put all unlinked nodes to the right?

digraph { rankdir=LR a -> b c -> b b -> d e // unlinked node } There are some nodes which are not linked to any of the other nodes in my dot file. Without explicitly using rank to define those nodes, is there any graceful…
Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
0
votes
1 answer

Get DOT graphviz of nested list elements which can contain duplicated nodes

I have a set of nested lists which can be seperated in three groups: A (subelements are disjunction, line colors GREEN), e.g. listA = { ‘a1’: ['b1', 'a2'], ‘a2’: ['c1', 'c2'] } B (subelements are ordered conjunction, line colors ORANGE),…
eljobso
  • 352
  • 2
  • 6
  • 20
0
votes
1 answer

graphviz' dijkstra tool not considering edge weights

I want to use the dijkstra-tool coming with the graphviz package to calculate the shortest path in a directed graph with positive (including 0) edge weights. But it seams that it does not consider the edge weights. I call it like this: dijkstra -dp…
nvrandow
  • 722
  • 10
  • 13
0
votes
1 answer

Represent array with indices using dot record nodes (Graphviz)

I'm using Graphviz to represent arrays, using subgraphs and record nodes: subgraph cluster_array { label="my array" Array [shape="record", label="A | B | C | D"] Array } I would like to add external indices for each array elements,…
Vittorio Romeo
  • 90,666
  • 33
  • 258
  • 416
0
votes
1 answer

Can't order dot - Graphviz anymore

I'm using Debian Jessie. I've been working on dot today and I haven't been able to order anything - even using the invisible nodes trick, rank=max, rank=same, etc. For example, this example: digraph hierarchy { nodesep=1.0 //…
d-cubed
  • 1,034
  • 5
  • 30
  • 58
0
votes
1 answer

Create a Graph with a Syntax Tree on Python

I have the output of my parser as something like this: [S[F[NP[DT your][N offer]][VP[V is][ADJ good]]][NO sonny]] And I need to convert it to an image of a graph with the syntax tree, something similar to what this site(http://mshang.ca/syntree/)…
0
votes
1 answer

How to layout boolean combinatorics system with dot

I have a problem with layout in Graphviz. I looking for a somewhat general way to have the inbound edges to enter a node evenly spread out on the left side and exit from the middle of the right side. In short I want to make something like this, But…
davl
  • 104
  • 1
  • 11
0
votes
1 answer

Graphivz does not render edge label when it's connecting two nodes with shape=point

I have the following graph description: graph G { {rank=same a b} a[shape=point] b[shape=point] a -- b [label=e]; } However, it outputs a single edge without a label (running graphviz with dot -Tpdf -o test.pdf test.dot): Rendering…
yeputons
  • 8,478
  • 34
  • 67
0
votes
1 answer

How to pick which side a node is on in a simple binary tree?

In a simple binary tree, I was able to make the graph look right by adding invisible nodes and invisible edges, for instance from: digraph { vertex_1 [label="A"]; vertex_2 [label="B"]; vertex_2 -> vertex_1…
0
votes
1 answer

visualizing yosys output not working

I'm using the (probably incorrect!) command yosys -f verilog -p "prep; show stretch count.dot" count.v for the following simple example module count(input clk,output [7:0] LEDS); reg [26:0] count; assign LEDS = count[26:19]; always @(posedge…
Chris Camacho
  • 1,164
  • 1
  • 9
  • 31
0
votes
2 answers

In Graphviz, can I adjust arrow pointing to rectangle's boundary?

Can I adjust arrow pointing to rectangle's boundary? I want to describe a stack pointer. Thanks! Like this:
haolee
  • 892
  • 9
  • 19
0
votes
2 answers

Restrict graph to a specific format

I have a very large graph made of several group of sub-graphs. I would like the groups of node to be distributed vertically and not horizontally. Is there a way to restrict this graph to a specific format? Or at least to change this horizontal…
1213
  • 706
  • 2
  • 8
  • 25
0
votes
1 answer

How to place Graphviz labels to avoid edges

digraph { X -> Y [xlabel="80"] Y -> Z [xlabel="60"] Z -> X [xlabel="3"] Y -> X [xlabel="1"] } I render the Graphviz dot file above using: dot -Tpng a.dot -o a.png but find that the output image, shown below, has the edges and arrowheads…
user2023370
  • 10,488
  • 6
  • 50
  • 83