Note that there are some explanatory texts on larger screens.

plurals
  1. POFamily tree layout with Dot/GraphViz
    primarykey
    data
    text
    <p>I am trying to draw a family tree with Dot and GraphViz.</p> <p>This is what I currently have: </p> <pre><code># just graph set-up digraph simpsons { ratio = "auto" mincross = 2.0 # draw some nodes "Abraham" [shape=box, regular=1, color="blue"] ; "Mona" [shape=box, regular=1, color="pink"] ; "Clancy" [shape=box, regular=1, color="blue"] ; "Jackeline" [shape=box, regular=1, color="pink"] ; "Herb" [shape=box, regular=1, color="blue"] ; "Homer" [shape=box, regular=1, color="blue"] ; "Marge" [shape=box, regular=1, color="pink"] ; "Patty" [shape=box, regular=1, color="pink"] ; "Selma" [shape=box, regular=1, color="pink"] ; "Bart" [shape=box, regular=1, color="blue"] ; "Lisa" [shape=box, regular=1, color="pink"] ; "Maggie" [shape=box, regular=1, color="pink"] ; "Ling" [shape=box, regular=1, color="blue"] ; # creating tiny nodes w/ no label, no color "ParentsHomer" [shape=diamond,style=filled,label="",height=.1,width=.1] ; "ParentsMarge" [shape=diamond,style=filled,label="",height=.1,width=.1] ; "ParentsBart" [shape=diamond,style=filled,label="",height=.1,width=.1] ; # draw the edges "Abraham" -&gt; "ParentsHomer" [dir=none, weight=1] ; "Mona" -&gt; "ParentsHomer" [dir=none, weight=1] ; "ParentsHomer" -&gt; "Homer" [dir=none, weight=2] ; "ParentsHomer" -&gt; "Herb" [dir=none, weight=2] ; "Clancy" -&gt; "ParentsMarge" [dir=none, weight=1] ; "Jackeline" -&gt; "ParentsMarge" [dir=none, weight=1] ; "ParentsMarge" -&gt; "Marge" [dir=none, weight=2] ; "ParentsMarge" -&gt; "Patty" [dir=none, weight=2] ; "ParentsMarge" -&gt; "Selma" [dir=none, weight=2] ; "Homer" -&gt; "ParentsBart" [dir=none, weight=1] ; "Marge" -&gt; "ParentsBart" [dir=none, weight=1] ; "ParentsBart" -&gt; "Bart" [dir=none, weight=2] ; "ParentsBart" -&gt; "Lisa" [dir=none, weight=2] ; "ParentsBart" -&gt; "Maggie" [dir=none, weight=2] ; "Selma" -&gt; "Ling" [dir=none, weight=2] ; } </code></pre> <p>If I run this through dot (<code>dot simpsons.dot -Tsvg &gt; simpsons.svg</code>), I get the following layout: <img src="https://i.imgur.com/gxSzS.png" alt="Original, made by dot/graphviz"></p> <p>However, I'd like the edges to be more "family tree"-like: a T-junction between two married persons with the vertical line of the T again branching in an upside-down T-junction with small subdivisions for each of the children, like this mock-up, done in KolourPaint:</p> <p><img src="https://i.imgur.com/H7jAX.png" alt="what I would like to achieve"></p> <p>What is the dot syntax that I have to use to achieve this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload