# Problems positioning nodes in a family tree with DOT

**URL:** <https://forum.graphviz.org/t/problems-positioning-nodes-in-a-family-tree-with-dot/3328>\
**Category:** Help\
**Created:** [April 14, 2026, 11:33am UTC](https://forum.graphviz.org/t/problems-positioning-nodes-in-a-family-tree-with-dot/3328 "2026-04-14T11:33:38Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [April 15, 2026, 1:44am UTC](https://forum.graphviz.org/t/problems-positioning-nodes-in-a-family-tree-with-dot/3328/10 "2026-04-15T01:44:28Z")

</div>

the **ortho** algorithm has a bunch of issues (see [Work items · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/work_items?sort=updated_desc&state=opened&search=%20ortho))

Here is a modestly improved version that uses [Graphviz post-processor to customize edges · GitHub](https://gist.github.com/steveroush/412d9c5479ba8f5c30239e4963338b82#file-alter_archive-sh) (see also [A program to "fix" simple edges](https://forum.graphviz.org/t/a-program-to-fix-simple-edges/1792))

command line:  
`f=forum3328_3.gv; T=png;F=${f%.*};dot $f |gvpr -cf alterSimpleEdge.gvpr|neato -n2 -T$T -o$F.$T`

```auto
digraph {
    //splines = ortho;
    node [shape=box]
    edge [dir=none]
edge [edgeType=ortho2]

    SMITH_BRIDGET [label="Bridget Smith", style=filled, fillcolor=bisque];
    SMITH_ADAM [label="Adam Smith", style=filled, fillcolor=azure2];

    SMITH_BERTRAND [label="Bertrand Smith", style=filled, fillcolor=azure2];
    JOHNSON_BEATRICE [label="Beatrice Johnson", style=filled, fillcolor=bisque];

    SMITH_CHARLES [label="Charles Smith", style=filled, fillcolor=azure2];
    NEWTON_CHARLOTTE [label="Charlotte Newton", style=filled, fillcolor=bisque];

    JOHNSON_BAINES [label="Baines Johnson", style=filled, fillcolor=azure2];
    MAXWELL_MARGARET [label="Margaret Maxwell", style=filled, fillcolor=bisque];

    JONES_MARY [label="Mary Jones", style=filled, fillcolor=bisque];
    JONES_HENRY_JR [label="Henry Jones Junior", style=filled, fillcolor=azure2];
    JONES_DIANA [label="Diana Jones", style=filled, fillcolor=bisque];

    JONES_HENRY [label="Henry Jones", style=filled, fillcolor=azure2];
    ADAMS_ABIGAIL [label="Abigail Adams", style=filled, fillcolor=bisque];

    JONES_JEREMIAH [label="Jeremiah Jones", style=filled, fillcolor=azure2];
    PLANK_PATRICIA [label="Patricia Plank", style=filled, fillcolor=bisque];

    ADAMS_DOUGLAS [label="Douglas Adams", style=filled, fillcolor=azure2];
    DENT_URSULA [label="Ursula Dent", style=filled, fillcolor=bisque];

    SMITH_JOHN [label="John Smith", style=filled, fillcolor=azure2];
    SMITH_JANE [label="Jane Smith", style=filled, fillcolor=bisque];

    subgraph clusterF1 {
        peripheries=0;
        {
            rank=same;
            F1_top [shape=circle, label="", height=0.01, width=0.01];
            SMITH_BERTRAND -> F1_top
            F1_top -> JOHNSON_BEATRICE
        }
    }
    {
        rank=same;
        F1_0 [shape=circle, label="", height=0.01, width=0.01];
        F1_1 [shape=circle, label="", height=0.01, width=0.01];
        F1_2 [shape=circle, label="", height=0.01, width=0.01];
        F1_0 -> F1_1 -> F1_2;
    }
    F1_top -> F1_1 // gives diagonal [edgeType=straight] // added
    F1_0 -> SMITH_BRIDGET [edgeType=straight] // added
    F1_2 -> SMITH_ADAM;

    subgraph clusterF2 {
        peripheries=0;
        {
            rank=same;
            F2_top [shape=circle, label="", height=0.01, width=0.01];
            JONES_HENRY -> F2_top
            F2_top -> ADAMS_ABIGAIL
        }
    }
    {
        rank=same;
        F2_0 [shape=circle, label="", height=0.01, width=0.01];
        F2_1 [shape=circle, label="", height=0.01, width=0.01];
        F2_2 [shape=circle, label="", height=0.01, width=0.01];
        F2_0 -> F2_1 -> F2_2;
    }
    F2_top -> F2_1;
    F2_0 -> JONES_MARY [edgeDirection=ccw]
    F2_1 -> JONES_HENRY_JR;
    F2_2 -> JONES_DIANA;

    subgraph clusterF3 {
        peripheries=0;
        {
            rank=same;
            F3_top [shape=circle, label="", height=0.01, width=0.01];
            SMITH_ADAM -> F3_top
            F3_top -> JONES_MARY
        }
    }
    {
        rank=same;
        F3_0 [shape=circle, label="", height=0.01, width=0.01];
        F3_1 [shape=circle, label="", height=0.01, width=0.01];
        F3_2 [shape=circle, label="", height=0.01, width=0.01];
        F3_0 -> F3_1 -> F3_2;
    }
    F3_top -> F3_1;
    F3_0 -> SMITH_JOHN;
    F3_2 -> SMITH_JANE;

    subgraph clusterF4 {
        peripheries=0;
        {
            rank=same;
            F4_top [shape=circle, label="", height=0.01, width=0.01];
            SMITH_CHARLES -> F4_top
            F4_top -> NEWTON_CHARLOTTE
        }
    }
    {
        rank=same;
        F4_0 [shape=circle, label="", height=0.01, width=0.01];
    }
    F4_top -> F4_0 [edgeDirection=ccw]
    F4_0 -> SMITH_BERTRAND 

    subgraph clusterF5 {
        peripheries=0;
        {
            rank=same;
            F5_top [shape=circle, label="", height=0.01, width=0.01];
            JOHNSON_BAINES -> F5_top
            F5_top -> MAXWELL_MARGARET
        }
    }
    {
        rank=same;
        F5_0 [shape=circle, label="", height=0.01, width=0.01];
    }
    F5_top -> F5_0;
    F5_0 -> JOHNSON_BEATRICE;

    subgraph clusterF6 {
        peripheries=0;
        {
            rank=same;
            F6_top [shape=circle, label="", height=0.01, width=0.01];
            JONES_JEREMIAH -> F6_top
            F6_top -> PLANK_PATRICIA
        }
    }
    {
        rank=same;
        F6_0 [shape=circle, label="", height=0.01, width=0.01];
    }
    F6_top -> F6_0;
    F6_0 -> JONES_HENRY;

    subgraph clusterF7 {
        peripheries=0;
        {
            rank=same;
            F7_top [shape=circle, label="", height=0.01, width=0.01];
            ADAMS_DOUGLAS -> F7_top
            F7_top -> DENT_URSULA
        }
    }
    {
        rank=same;
        F7_0 [shape=circle, label="", height=0.01, width=0.01];
    }
    F7_top -> F7_0;
    F7_0 -> ADAMS_ABIGAIL [edgeDirection=ccw]
}

```

Giving:

 ![forum3328_3](https://global.discourse-cdn.com/graphviz/original/2X/b/b73ae2af343601cf1e330af528b7509c51117f2a.png)

I realize that this is really a **bus** (as in busbar) problem (see: [Drawing busses for network and other diagrams (#1987) · Issues · graphviz / graphviz · GitLab](https://gitlab.com/graphviz/graphviz/-/work_items/1987)).

I may have a better solution in the dusty corners of my computer. looking …

---

_[View the full topic](https://forum.graphviz.org/t/problems-positioning-nodes-in-a-family-tree-with-dot/3328)._
