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

Is there any suitable way to generate a [jpg, png etc.] syntax diagram(and/or AST) directly from Scala Parser Combinators?

The only ways I am aware of, aren't "direct": converting to ANTLR format and using its own visualizer VISUALLANGLAB, which it seems to require an entire mouse-clicks "rewrite" implementing a converter by myself (which would be funny, but…
user445107
16
votes
2 answers

How to strike-through text in dot language (graphviz)

I am trying to find out how can I strike-through some text in my nodes in dot based graphviz diagrams? I checked out on this page, but couldn't figure out: http://www.graphviz.org/doc/info/attrs.html Googling around didn't help as well. Consider…
bits
  • 8,110
  • 8
  • 46
  • 55
15
votes
1 answer

dot graph without labels

I have a graph file to draw using "dot". I don't want to show any label for any node. I am wondering how to do this without specifying a configuration for each node since there are too many nodes in the graph.
user414585
  • 715
  • 2
  • 8
  • 14
15
votes
2 answers

Groups of nodes with the same attributes in GraphViz file

In the dot language of GraphViz I want to describe a 2-mode network. So I have nodes of two different types. One group for example could contains people how read and the other group could contain the books being read by the people. I want to give…
halloleo
  • 9,216
  • 13
  • 64
  • 122
15
votes
2 answers

How to add an annotation outside of a node in Graphviz' dot?

I am very new to Dot and trying to visualize a callgraph with Dot and Zest in Eclipse. And I would like to annotate nodes with kind of annotation (OK and Failed on the pic.). Is there any common way to do this for Dot or Zest?
Andrey Solovyov
  • 551
  • 7
  • 21
15
votes
1 answer

Graphviz (DOT), different fontsizes in same label

I wonder if it is possible to use different font sizes in the same label. If so, could any provide me with example?
Erhnam
  • 901
  • 2
  • 13
  • 23
15
votes
1 answer

How do I get graphviz to generate fixed sized subgraphs?

I've been struggling with this for a while and cannot seem to find a straight answer. I'm working with compound subgraphs in graphviz and cannot seem to find the right combination of settings to force two subgraphs to align with each other. Enclosed…
user1818047
  • 151
  • 1
  • 1
  • 3
14
votes
2 answers

graphviz: record node with a bold title

I'm trying to use graphviz to do something similar to UML class diagrams. I wonder whether there is a way to make a node of style 'register' have its first field in a bold font, to make it different from the other fields. My node looks like…
eordano
  • 452
  • 1
  • 5
  • 11
14
votes
3 answers

How to draw multiple graphs with dot?

I have a print_dot() function that outputs dot on stdout. That way I can do: $ ./myprogram < input | dot -T x11 It works great when I try to print one graph. Now when I print several graphs, nothing shows up. The dot window is blank, X11 and dot…
knarf
  • 2,672
  • 3
  • 26
  • 31
14
votes
2 answers

Change Size (Width and Height) of Graph (GraphViz & dot)

Often, the default layout of graphs drawn by GraphViz in the dot language is a little "tight." With too little visual space, it's hard to put meaningful labels on edges and the graph can look cluttered. How do I affect the vertical and horizontal…
TomServo
  • 7,248
  • 5
  • 30
  • 47
14
votes
1 answer

Graphviz Vertical Ordering

I have a set of GraphViz nodes such that: digraph { A->B; A->C; A->D; } But B, C, and D happen sequentially in time! It would be great if there was some way to indicate the vertical level each node should appear upon (where the number…
Richard
  • 56,349
  • 34
  • 180
  • 251
14
votes
1 answer

Excluding specific headers from dependency graphs

I am not sure whether this is to be a doxygen or a dot question, but here goes. In my project I have many files that need to include common headers such stdlib.h, stdint.h, and so on. When I ask doxygen to generate the dependency graphs for each of…
Thomas
  • 3,321
  • 1
  • 21
  • 44
14
votes
1 answer

Distribute nodes on the same rank of a wide graph to different lines

I have a graph (organigram) how this: digraph G { nodesep=0.3; ranksep=0.2; margin=0.1; node [shape=rectangle]; edge [arrowsize=0.8]; 1 -> 2; 1 -> 3; 1 -> 4; 1 -> 5; 1 -> 6; 1 -> 7; 1 -> 8; 1 -> 9; 1 -> 10; } I have organigrams with 70 people and…
hazardco
  • 387
  • 1
  • 4
  • 13
13
votes
2 answers

Change subgraph cluster shape to rounded rectangle

I have the following graph: digraph G {rankdir="LR"; node [fontname = "font-awesome"]; subgraph cluster17 { 2 [id=2, shape=rect;color="#A4A4A4";fillcolor="white";label=<
1:10
>,…
Code Pope
  • 5,075
  • 8
  • 26
  • 68
13
votes
3 answers

How can I make DOT/neato graphs more compact without introducing overlap?

My question is essentially the same as this one but the given answer doesn't work for me. Here is a sample rendering (source) with compound=true; overlap=scalexy; splines=true; layout=neato; There is some unnecessary overlap in the edges but this…
spraff
  • 32,570
  • 22
  • 121
  • 229