/usr/share/doc/dot2tex/examples/sportsbracket.dot is in dot2tex 2.8.7+repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | /*
:Title: Orthogonal edges
:Tags: PGF, topath
This example is adapted from an example posted by Ryan Schmidt to the `graphviz-interest`_ mailing
list. Graphviz currently does not support orthogonal edges. However,
with dot2tex you can use the ``topath`` attribute to create custom edges.
Here is the definition of the ``fork horizontal`` to-path. It uses the powerful
*coordinate calculations* feature introduced in PGF 2.00.
.. sourcecode:: latex
...
\usetikzlibrary{calc}
...
\tikzstyle{fork horizontal} =[to path={
-| ($(\tikztostart)!0.5!(\tikztotarget)$) |- (\tikztotarget) \tikztonodes}]
**Note**: This example requires PGF 2.00 or later.
Generated with::
$ dot2tex --crop sportsbracket.dot > sportsbracket.tex
.. _graphviz-interest: https://mailman.research.att.com/pipermail/graphviz-interest/2008q2/thread.html#5129
*/
digraph G {
// Put our custom fork horizontal to path in the document preamble
d2tdocpreamble = "\usetikzlibrary{calc}\
\tikzstyle{fork horizontal} =[to path={\
-| ($(\tikztostart)!0.5!(\tikztotarget)$) |- (\tikztotarget) \tikztonodes}]";
rankdir=LR
node [shape=box, width=2]
graph [size="8.5,11" label="NCAA Men's Basketball: 2008 Tournament"]
11 [label="North Carolina"]
12 [label="Mount St. Mary's"]
13 [label="Indiana"]
14 [label="Arkansas"]
15 [label="Notre Dame"]
16 [label="George Mason"]
17 [label="Washington St."]
18 [label="Winthrop"]
19 [label="Oklahoma"]
110 [label="St. Joseph's"]
111 [label="Louisville"]
112 [label="Boise St."]
113 [label="Butler"]
114 [label="South Alabama"]
115 [label="Tennessee"]
116 [label="American"]
21 [label="North Carolina"]
22 [label="Arkansas"]
23 [label="Notre Dame"]
24 [label="Washington St."]
25 [label="Oklahoma"]
26 [label="Louisville"]
27 [label="Butler"]
28 [label="Tennessee"]
31 [label="North Carolina"]
32 [label="Washington St."]
33 [label="Louisville"]
34 [label="Tennessee"]
41 [label="North Carolina"]
42 [label="Louisville"]
51 [label="North Carolina"]
// Use the custom 'fork horizontal' to path defined above
edge [topath="fork horizontal"];
11:e->21:w
12:e->21:w
13:e->22:w
14:e->22:w
15:e->23:w
16:e->23:w
17:e->24:w
18:e->24:w
19:e->25:w
110:e->25:w
111:e->26:w
112:e->26:w
113:e->27:w
114:e->27:w
115:e->28:w
116:e->28:w
21:e->31:w
22:e->31:w
23:e->32:w
24:e->32:w
25:e->33:w
26:e->33:w
27:e->34:w
28:e->34:w
31:e->41:w
32:e->41:w
33:e->42:w
34:e->42:w
41:e->51:w
42:e->51:w
edge [style=invis]
rank=same {11->12->13->14->15->16->17->18->19->110->111->112->113->114->115->116}
}
|