# Combine Graphs for Different Splines: Not possible with overlap or processing failure

**URL:** <https://forum.graphviz.org/t/combine-graphs-for-different-splines-not-possible-with-overlap-or-processing-failure/865>\
**Category:** Help\
**Created:** [October 6, 2021, 10:07pm UTC](https://forum.graphviz.org/t/combine-graphs-for-different-splines-not-possible-with-overlap-or-processing-failure/865 "2021-10-06T22:07:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atanasj](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/atanasj/32/479_2.png) [@atanasj](https://forum.graphviz.org/u/atanasj)\
**Post date:** [October 6, 2021, 10:07pm UTC](https://forum.graphviz.org/t/combine-graphs-for-different-splines-not-possible-with-overlap-or-processing-failure/865/1 "2021-10-06T22:07:46Z")

</div>

I have a graphs two graphs that I have developed where I want to combine `splines=line` and `splines=curved`.

I want it to look like this:

 ![model_fin](https://global.discourse-cdn.com/graphviz/original/1X/e3249f263ebf69d2bbc7e713ee4ff32fd72d6134.jpeg)

I have been given great advice on StackOverflow that @steveroush kindly helped with:

1. One that process two graphs and joins them via `gvpack` [here](https://stackoverflow.com/questions/69341993/graphs-with-mixed-splines-or-merge-layers-with-different-splines/69353248?noredirect=1#comment122584483_69353248). This is the output:

 ![model_n](https://global.discourse-cdn.com/graphviz/original/1X/1ddf5d29b7c2dee276470b69701d2c968a205591.png)

1. And one that takes two passes of the same graph after adding arguments in the `edge` statements, i.e., `edge[keep=1]` which is later post-processed via `gvpr` [here](https://stackoverflow.com/questions/62687030/is-there-a-way-to-have-different-edge-splines-between-nodes-in-the-same-cluster). And this is the output with the splines as `line` then `true`:

 ![gv_help](https://global.discourse-cdn.com/graphviz/original/1X/dfd70ddf9f14ed914877b7afc684471098109284.png)

My preferred option is 2 because I only have to deal with one graph, however the `splines=curved` argument won’t complete it, maybe because there are so many edges to align… I’m not sure.

I have posted the syntax for option 2 below, but syntax is essentially the same. I can post both if needed, but don’t want to pollute the post unnecessarily. Can someone please help me get this working?

Please let me know if you need any more info regarding my questions. Thanks in advance.

* * *

```auto
digraph dot {

    // splines = curved;
    // splines = spline; // defualt
    // splines = line;
    // splines = ortho;
    // concentrate = true;3.9
    // compound = true;
    // overlap = false;.
    // graph[fontname = arial, margin = 0, compound = true, pack = true]
    // graph[fontname = arial, margin = 0, compound = true, pack = true, rank = same]
    node[fontname = arial, width = 0.0, height = 0.0, fixedsize = true, shape = point, fontsize = 44, style = filled, penwidth = 6, fillcolor = white];
    edge[fontname = arial, penwidth = 6, fontsize = 28, arrowsize = 2, dir = none]

    // invisible anchors
    BW0t [pos = "0000, 0000", shape = point, style = invis];
    BW00 [pos = "1000, 0000", shape = point, style = invis];
    BW01 [pos = "2000, 0000", height = 0.7, shape = circle, style = invis];
    BW02 [pos = "3000, 0000", shape = point, style = invis];
    BW03 [pos = "4000, 0000", shape = point, style = invis];
    BW04 [pos = "5000, 0000", width = 1, height = 1, shape = point, style = invis];
    BW0m [pos = "6000, 0000", shape = point, style = invis];
    BW05 [pos = "7000, 0000", width = 1, height = 1, shape = point, style = invis];
    BW06 [pos = "8000, 0000", shape = point, style = invis];
    BW07 [pos = "9000, 0000", shape = point, style = invis];
    BW08 [pos = "1000, 0000", height = 0.7, shape = circle, style = invis];
    BW09 [pos = "1100, 0000", shape = point, style = invis];
    BW0b [pos = "1200, 0000", shape = point, style = invis];
    // random intercpents and anchors
    BWit [pos = "0000, 0100", style = invis];
    BWi0 [pos = "1000, 0100", style = invis];
    BWi1 [pos = "2000, 0100", height = 0.7, style = invis];
    BWi2 [pos = "3000, 0100", style = invis];
    BWi3 [pos = "4000, 0100", label = "Bsi", width = 3.9, height = 3.9, shape = circle, fillcolor = darkseagreen3];
    BWi4 [pos = "5000, 0100", width = 1, height = 1, style = invis];
    BWim [pos = "6000, 0100", shape = point, style = invis];
    BWi5 [pos = "7000, 0100", width = 1, height = 1, style = invis];
    BWi6 [pos = "8000, 0100", label = "Bpb", width = 3.6, height = 3.6, shape = circle, fillcolor = palevioletred];
    BWi7 [pos = "9000, 0100", style = invis];
    BWi8 [pos = "1000, 0100", height = 0.7, style = invis];
    BWi9 [pos = "1100, 0100", style = invis];
    BWib [pos = "1200, 0100", style = invis];
    // WI1 = time 1
    WI1t [pos = "0000, 0200", style = invis];
    WI10 [pos = "1000, 0200", shape = point, style = filled, fillcolor = black];
    WI11 [pos = "2000, 0200", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI12 [pos = "3000, 0200", label = "si1", width = 3, height = 3, shape = square, fillcolor = darkseagreen3];
    WI13 [pos = "4000, 0200", label = "Wsi1", width = 3, height = 3, shape = circle, fillcolor = darkseagreen3];
    WI14 [pos = "5000, 0200", label = <e<sub>l</sub>>, height = 1, shape = circle, style = invis];
    WI1m [pos = "6000, 0200", shape = point, style = invis];
    WI15 [pos = "7000, 0200", label = <e<sub>l</sub>>, height = 1, shape = circle, style = invis];
    WI16 [pos = "8000, 0200", label = "Wpb1", width = 3, height = 3, shape = circle, fillcolor = palevioletred];
    WI17 [pos = "9000, 0200", label = "pb1", width = 3, height = 3, shape = square, fillcolor = palevioletred];
    WI18 [pos = "1000, 0200", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI19 [pos = "1100, 0200", shape = point, width = 6, style = filled, fillcolor = black];
    WI1b [pos = "1200, 0200", style = invis];
    // WI2 = time 2
    WI2t [pos = "0000, 0300", shape = point, style = invis];
    WI20 [pos = "1000, 0300", shape = point, width = 6, style = filled, fillcolor = black];
    WI21 [pos = "2000, 0300", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI22 [pos = "3000, 0300", label = "si2", width = 3, height = 3, shape = square, fillcolor = darkseagreen3];
    WI23 [pos = "4000, 0300", label = "Wsi2", width = 3, height = 3, shape = circle, fillcolor = darkseagreen3];
    WI24 [pos = "5000, 0300", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI2m [pos = "6000, 0300", shape = point, style = invis];
    WI25 [pos = "7000, 0300", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI26 [pos = "8000, 0300", label = "Wpb2", width = 3, height = 3, shape = circle, fillcolor = palevioletred];
    WI27 [pos = "9000, 0300", label = "pb2", width = 3, height = 3, shape = square, fillcolor = palevioletred];
    WI28 [pos = "1000, 0300", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI29 [pos = "1100, 0300", shape = point, width = 6, style = filled, fillcolor = black];
    WI2b [pos = "1200, 0300", shape = point, style = invis];
    // WI3 = time 3
    WI3t [pos = "0000, 0400", shape = point, style = invis];
    WI30 [pos = "1000, 0400", shape = point, width = 6, style = filled, fillcolor = black];
    WI31 [pos = "2000, 0400", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI32 [pos = "3000, 0400", label = "si3", width = 3, height = 3, shape = square, fillcolor = darkseagreen3];
    WI33 [pos = "4000, 0400", label = "Wsi3", width = 3, height = 3, shape = circle, fillcolor = darkseagreen3];
    WI34 [pos = "5000, 0400", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI3m [pos = "6000, 0400", shape = point, style = invis];
    WI35 [pos = "7000, 0400", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI36 [pos = "8000, 0400", label = "Wpb3", width = 3, height = 3, shape = circle, fillcolor = palevioletred];
    WI37 [pos = "9000, 0400", label = "pb3", width = 3, height = 3, shape = square, fillcolor = palevioletred];
    WI38 [pos = "1000, 0400", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI39 [pos = "1100, 0400", shape = point, width = 6, style = filled, fillcolor = black];
    WI3b [pos = "1200, 0400", shape = point, style = invis];
    // WI4 = time 4
    WI4t [pos = "0000, 0500", shape = point, style = invis];
    WI40 [pos = "1000, 0500", shape = point, width = 6, style = filled, fillcolor = black];
    WI41 [pos = "2000, 0500", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI42 [pos = "3000, 0500", label = "si4", width = 3, height = 3, shape = square, fillcolor = darkseagreen3];
    WI43 [pos = "4000, 0500", label = "Wsi4", width = 3, height = 3, shape = circle, fillcolor = darkseagreen3];
    WI44 [pos = "5000, 0500", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI4m [pos = "6000, 0500", shape = point, style = invis];
    WI45 [pos = "7000, 0500", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI46 [pos = "8000, 0500", label = "Wpb4", width = 3, height = 3, shape = circle, fillcolor = palevioletred];
    WI47 [pos = "9000, 0500", label = "pb4", width = 3, height = 3, shape = square, fillcolor = palevioletred];
    WI48 [pos = "1000, 0500", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI49 [pos = "1100, 0500", shape = point, width = 6, style = filled, fillcolor = black];
    WI4b [pos = "1200, 0500", shape = point, style = invis];
    // WI5 = time 5
    WI5t [pos = "0000, 0600", shape = point, style = invis];
    WI50 [pos = "1000, 0600", shape = point, width = 6, style = filled, fillcolor = black];
    WI51 [pos = "2000, 0600", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI52 [pos = "3000, 0600", label = "si5", width = 3, height = 3, shape = square, fillcolor = darkseagreen3];
    WI53 [pos = "4000, 0600", label = "Wsi5", width = 3, height = 3, shape = circle, fillcolor = darkseagreen3];
    WI54 [pos = "5000, 0600", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI5m [pos = "6000, 0600", shape = point, style = invis];
    WI55 [pos = "7000, 0600", label = <e<sub>l</sub>>, height = 1, shape = circle, style = filled];
    WI56 [pos = "8000, 0600", label = "Wpb5", width = 3, height = 3, shape = circle, fillcolor = palevioletred];
    WI57 [pos = "9000, 0600", label = "pb5", width = 3, height = 3, shape = square, fillcolor = palevioletred];
    WI58 [pos = "1000, 0600", label = <e<sub>o</sub>>, height = 1, shape = circle, style = filled];
    WI59 [pos = "1100, 0600", shape = point, width = 6, style = filled, fillcolor = black];
    WI5b [pos = "1200, 0600", shape = point, style = invis];
    // AUX
    AUXt [pos = "0000, 0700", shape = point, style = invis];
    AUX0 [pos = "1000, 0700", shape = point, width = 6, style = filled, fillcolor = black];
    AUX1 [pos = "2000, 0700", height = 0.7, shape = circle, style = invis];
    AUX2 [pos = "3000, 0700", shape = point, style = invis];
    AUX3 [pos = "4000, 0700", shape = point, style = invis];
    AUX4 [pos = "5000, 0700", width = 1, height = 1, shape = point, style = invis];
    AUXm [pos = "6000, 0700", label = "<f0>AUXILIARY\nVARIABLES", width = 4, height = 1.75, shape = record, fillcolor = white];
    AUX5 [pos = "7000, 0700", width = 1, height = 1, shape = point, style = invis];
    AUX6 [pos = "8000, 0700", shape = point, style = invis];
    AUX7 [pos = "9000, 0700", shape = point, style = invis];
    AUX8 [pos = "1000, 0700", height = 0.7, shape = circle, style = invis];
    AUX9 [pos = "1100, 0700", shape = point, width = 6, style = filled, fillcolor = black];
    AUXb [pos = "1200, 0700", shape = point, style = invis];
    // END
    ENDt [pos = "0000, 0800", shape = point, style = invis];
    END0 [pos = "1000, 0800", shape = point, style = invis];
    END1 [pos = "2000, 0800", height = 0.7, shape = circle, style = invis];
    END2 [pos = "3000, 0800", shape = square, style = invis];
    END3 [pos = "4000, 0800", shape = circle, style = invis];
    END4 [pos = "5000, 0800", width = 1, height = 1, shape = point, style = invis];
    ENDm [pos = "6000, 0800", shape = point, style = invis];
    END5 [pos = "7000, 0800", width = 1, height = 1, shape = point, style = invis];
    END6 [pos = "8000, 0800", shape = circle, style = invis];
    END7 [pos = "9000, 0800", shape = square, style = invis];
    END8 [pos = "1000, 0800", height = 0.7, shape = circle, style = invis];
    END9 [pos = "1100, 0800", shape = point, style = invis];
    ENDb [pos = "1200, 0800", shape = point, style = invis];

    // vertical edges
    { edge [keep = 1, weight = 12, minlen = 2.15; style = invis, penwidth = 3];
        // left anchors
        BW0t:s -> BW00:n ;
        BW00:s -> BW01:n ;
        BW01:s -> BW02:n ;
        BW02:s -> BW03:n ;
        BW03:s -> BW04:n ;
        BW04:s -> BW0m:n ;
        BW0m:s -> BW05:n ;
        BW05:s -> BW06:n ;
        BW06:s -> BW07:n ;
        BW07:s -> BW08:n ;
        BW08:s -> BW09:n ;
        BW09:s -> BW0b:n ;
        // random intercepts
        BWit:s -> BWi0:n ;
        BWi0:s -> BWi1:n ;
        BWi1:s -> BWi2:n ;
        BWi2:s -> BWi3:n ;
        BWi3:s -> BWi4:n ;
        BWi4:s -> BWim:n ;
        BWim:s -> BWi5:n ;
        BWi5:s -> BWi6:n ;
        BWi6:s -> BWi7:n ;
        BWi7:s -> BWi8:n ;
        BWi8:s -> BWi9:n ;
        BWi9:s -> BWib:n ;
        // Time 1
        WI1t:s -> WI10:n ;
        WI10:s -> WI11:n ;
        WI11:s -> WI12:n ;
        WI12:s -> WI13:n ;
        WI13:s -> WI14:n ;
        WI14:s -> WI1m:n ;
        WI1m:s -> WI15:n ;
        WI15:s -> WI16:n ;
        WI16:s -> WI17:n ;
        WI17:s -> WI18:n ;
        WI18:s -> WI19:n ;
        WI19:s -> WI1b:n ;
        // Time 2
        WI2t:s -> WI20:n ;
        WI20:s -> WI21:n ;
        WI21:s -> WI22:n ;
        WI22:s -> WI23:n ;
        WI23:s -> WI24:n ;
        WI24:s -> WI2m:n ;
        WI2m:s -> WI25:n ;
        WI25:s -> WI26:n ;
        WI26:s -> WI27:n ;
        WI27:s -> WI28:n ;
        WI28:s -> WI29:n ;
        WI29:s -> WI2b:n ;
        // Time 3
        WI3t:s -> WI30:n ;
        WI30:s -> WI31:n ;
        WI31:s -> WI32:n ;
        WI32:s -> WI33:n ;
        WI33:s -> WI34:n ;
        WI34:s -> WI3m:n ;
        WI3m:s -> WI35:n ;
        WI35:s -> WI36:n ;
        WI36:s -> WI37:n ;
        WI37:s -> WI38:n ;
        WI38:s -> WI39:n ;
        WI39:s -> WI3b:n ;
        // Time 4
        WI4t:s -> WI40:n ;
        WI40:s -> WI41:n ;
        WI41:s -> WI42:n ;
        WI42:s -> WI43:n ;
        WI43:s -> WI44:n ;
        WI44:s -> WI4m:n ;
        WI4m:s -> WI45:n ;
        WI45:s -> WI46:n ;
        WI46:s -> WI47:n ;
        WI47:s -> WI48:n ;
        WI48:s -> WI49:n ;
        WI49:s -> WI4b:n ;
        // Time 4
        WI5t:s -> WI50:n ;
        WI50:s -> WI51:n ;
        WI51:s -> WI52:n ;
        WI52:s -> WI53:n ;
        WI53:s -> WI54:n ;
        WI54:s -> WI5m:n ;
        WI5m:s -> WI55:n ;
        WI55:s -> WI56:n ;
        WI56:s -> WI57:n ;
        WI57:s -> WI58:n ;
        WI58:s -> WI59:n ;
        WI59:s -> WI5b:n ;
        // aux
        AUXt:s -> AUX0:n ;
        AUX0:s -> AUX1:n ;
        AUX1:s -> AUX2:n ;
        AUX2:s -> AUX3:n ;
        AUX3:s -> AUX4:n ;
        AUX4:s -> AUXm:n ;
        AUXm:s -> AUX5:n ;
        AUX5:s -> AUX6:n ;
        AUX6:s -> AUX7:n ;
        AUX7:s -> AUX8:n ;
        AUX8:s -> AUX9:n ;
        AUX9:s -> AUXb:n ;
        // end
        ENDt:s -> END0:n ;
        END0:s -> END1:n ;
        END1:s -> END2:n ;
        END2:s -> END3:n ;
        END3:s -> END4:n ;
        END4:s -> ENDm:n ;
        ENDm:s -> END5:n ;
        END5:s -> END6:n ;
        END6:s -> END7:n ;
        END7:s -> END8:n ;
        END8:s -> END9:n ;
        END9:s -> ENDb:n ;
    }

    // autogregrssive paths
    // level t:
    { rank = same; BW0t:e -> BWit:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWit:e -> WI1t:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI1t:e -> WI2t:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI2t:e -> WI3t:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI3t:e -> WI4t:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI4t:e -> WI5t:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI5t:e -> AUXt:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUXt:e -> ENDt:w [keep = 1, minlen = 9, style = invis]; }

    // level 0:
    { rank = same; BW00:e -> BWi0:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi0:e -> WI10:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI10:e -> WI20:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI20:e -> WI30:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI30:e -> WI40:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI40:e -> WI50:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI50:e -> AUX0:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX0:e -> END0:w [keep = 1, minlen = 9, style = invis]; }

    // level 1:
    { rank = same; BW01:e -> BWi1:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi1:e -> WI11:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI11:e -> WI21:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI21:e -> WI31:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI31:e -> WI41:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI41:e -> WI51:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI51:e -> AUX1:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX1:e -> END1:w [keep = 1, minlen = 9, style = invis]; }

    // level 2:
    { rank = same; BW02:e -> BWi2:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi2:e -> WI12:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI12:e -> WI22:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI22:e -> WI32:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI32:e -> WI42:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI42:e -> WI52:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI52:e -> AUX2:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX2:e -> END2:w [keep = 1, minlen = 9, style = invis]; }

    // level 3:
    { rank = same; BW03:e -> BWi3:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi3:e -> WI13:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI13:e -> WI23:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI23:e -> WI33:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI33:e -> WI43:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI43:e -> WI53:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI53:e -> AUX3:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX3:e -> END3:w [keep = 1, minlen = 9, style = invis]; }

    // level 4:
    { rank = same; BW04:e -> BWi4:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi4:e -> WI14:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI14:e -> WI24:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI24:e -> WI34:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI34:e -> WI44:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI44:e -> WI54:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI54:e -> AUX4:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX4:e -> END4:w [keep = 1, minlen = 9, style = invis]; }

    // level m:
    { rank = same; BW0m:e -> BWim:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWim:e -> WI1m:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI1m:e -> WI2m:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI2m:e -> WI3m:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI3m:e -> WI4m:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI4m:e -> WI5m:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI5m:e -> AUXm:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUXm:e -> ENDm:w [keep = 1, minlen = 9, style = invis]; }

    // level 5:
    { rank = same; BW05:e -> BWi5:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi5:e -> WI15:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI15:e -> WI25:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI25:e -> WI35:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI35:e -> WI45:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI45:e -> WI55:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI55:e -> AUX5:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX5:e -> END5:w [keep = 1, minlen = 9, style = invis]; }

    // level 6:
    { rank = same; BW06:e -> BWi6:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi6:e -> WI16:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI16:e -> WI26:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI26:e -> WI36:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI36:e -> WI46:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI46:e -> WI56:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI56:e -> AUX6:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX6:e -> END6:w [keep = 1, minlen = 9, style = invis]; }

    // level 7:
    { rank = same; BW07:e -> BWi7:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi7:e -> WI17:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI17:e -> WI27:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI27:e -> WI37:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI37:e -> WI47:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI47:e -> WI57:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI57:e -> AUX7:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX7:e -> END7:w [keep = 1, minlen = 9, style = invis]; }

    // level 8:
    { rank = same; BW08:e -> BWi8:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi8:e -> WI18:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI18:e -> WI28:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI28:e -> WI38:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI38:e -> WI48:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI48:e -> WI58:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI58:e -> AUX8:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX8:e -> END8:w [keep = 1, minlen = 9, style = invis]; }

    // level 9:
    { rank = same; BW09:e -> BWi9:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWi9:e -> WI19:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI19:e -> WI29:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI29:e -> WI39:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI39:e -> WI49:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI49:e -> WI59:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI59:e -> AUX9:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUX9:e -> END9:w [keep = 1, minlen = 9, style = invis]; }

    // level b:
    { rank = same; BW0b:e -> BWib:w [keep = 1, minlen = 9, style = invis]; }
    { rank = same; BWib:e -> WI1b:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI1b:e -> WI2b:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI2b:e -> WI3b:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI3b:e -> WI4b:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI4b:e -> WI5b:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; WI5b:e -> AUXb:w [keep = 1, minlen = 12, style = invis]; }
    { rank = same; AUXb:e -> ENDb:w [keep = 1, minlen = 9, style = invis]; }

    // error edges
    {
        edge[keep = 1, style = filled, dir = forward]
        // random intercepts
        BWi3:ne -> WI12:sw
        BWi6:se -> WI17:nw
        BWi3:ne -> WI22:sw
        BWi6:se -> WI27:nw
        BWi3:ne -> WI32:sw
        BWi6:se -> WI37:nw
        BWi3:ne -> WI42:sw
        BWi6:se -> WI47:nw
        BWi3:ne -> WI52:sw
        BWi6:se -> WI57:nw
        // latent variables
        WI13:n -> WI12:s
        WI16:s -> WI17:n
        WI23:n -> WI22:s
        WI26:s -> WI27:n
        WI33:n -> WI32:s
        WI36:s -> WI37:n
        WI43:n -> WI42:s
        WI46:s -> WI47:n
        WI53:n -> WI52:s
        WI56:s -> WI57:n
        // latent variances
        WI24 -> WI23
        WI25 -> WI26
        WI34 -> WI33
        WI35 -> WI36
        WI44 -> WI43
        WI45 -> WI46
        WI54 -> WI53
        WI55 -> WI56
    }

    {
        edge[keep = 1, style = filled, dir = forward]
        // autoregressive paths
        WI13 -> WI23 ;
        WI23 -> WI33 ;
        WI33 -> WI43 ;
        WI43 -> WI53 ;
        WI16 -> WI26 ;
        WI26 -> WI36 ;
        WI36 -> WI46 ;
        WI46 -> WI56 ;
        // cross-lagged paths
        WI13 -> WI26 ;
        WI16 -> WI23 ;
        WI23 -> WI36 ;
        WI26 -> WI33 ;
        WI33 -> WI46 ;
        WI36 -> WI43 ;
        WI43 -> WI56 ;
        WI46 -> WI53 ;
    }

    {
        // latent covariances
        BWi3:sw -> BWi6:nw [dir = both] // needs to be curved
        WI13 -> WI16 [dir = both] // needs to be curved
        WI24 -> WI25 [dir = both] // needs to be curved
        WI34 -> WI35 [dir = both] // needs to be curved
        WI44 -> WI45 [dir = both] // needs to be curved
        WI54 -> WI55 [dir = both] // needs to be curved
        // AUX self corr
        AUXm:ne -> AUXm:se [dir = both] ;
        // AUXm:n -> ENDm:c [dir = forward] ;
        // AUXm:n -> ENDm:c -> AUXm:s [dir = both] ;
        // AUXm:ne -> ENDm:n [dir = back] ;
        // ENDm:s -> AUXm:se [dir = forward] ;
    }

    {
        edge[keep = 1, style = filled, penwidth = 6, concentrate = true, dir = none, arrowsize = 0]
        // aux
        AUXm:n -> AUX0:c [dir = none];
        AUX0:c -> WI10:c [dir = none];

        WI50:c -> WI51:c [arrowsize = 2, dir = forward];
        WI40:c -> WI41:c [arrowsize = 2, dir = forward];
        WI30:c -> WI31:c [arrowsize = 2, dir = forward];
        WI20:c -> WI21:c [arrowsize = 2, dir = forward];
        WI10:c -> WI11:c [arrowsize = 2, dir = forward];

        WI51:c -> WI52:c [arrowsize = 2, dir = forward];
        WI41:c -> WI42:c [arrowsize = 2, dir = forward];
        WI31:c -> WI32:c [arrowsize = 2, dir = forward];
        WI21:c -> WI22:c [arrowsize = 2, dir = forward];
        WI11:c -> WI12:c [arrowsize = 2, dir = forward];

        AUXm:s -> AUX9:c [dir = none];
        AUX9:c -> WI19:c [dir = none];

        WI59:c -> WI58:c [arrowsize = 2, dir = forward];
        WI49:c -> WI48:c [arrowsize = 2, dir = forward];
        WI39:c -> WI38:c [arrowsize = 2, dir = forward];
        WI29:c -> WI28:c [arrowsize = 2, dir = forward];
        WI19:c -> WI18:c [arrowsize = 2, dir = forward];

        WI58:c -> WI57:c [arrowsize = 2, dir = forward];
        WI48:c -> WI47:c [arrowsize = 2, dir = forward];
        WI38:c -> WI37:c [arrowsize = 2, dir = forward];
        WI28:c -> WI27:c [arrowsize = 2, dir = forward];
        WI18:c -> WI17:c [arrowsize = 2, dir = forward];

    }
}

```

---

<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:** [October 6, 2021, 11:09pm UTC](https://forum.graphviz.org/t/combine-graphs-for-different-splines-not-possible-with-overlap-or-processing-failure/865/2 "2021-10-06T23:09:24Z")

</div>

Getting a spline positioned “just so” can be quite challenging, even without the combo spline problems. I’ll fiddle with it and see how close we can get.  
Two questions:

- Is this a one-time graph, or will there be other variations?
- If “necessary”, are you willing to consider a different diagramming language? (Since you are already doing the layout yourself)

---

<div class="post-metadata">

**Author:** ![atanasj](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/atanasj/32/479_2.png) [@atanasj](https://forum.graphviz.org/u/atanasj)\
**Post date:** [October 6, 2021, 11:28pm UTC](https://forum.graphviz.org/t/combine-graphs-for-different-splines-not-possible-with-overlap-or-processing-failure/865/3 "2021-10-06T23:28:23Z")

</div>

Thanks @steveroush.

1. This is probably a onetime graph, but I could use it as a template in future as it reflect a statistical model that I am likely to use again. That’s why I wanted to get this right programmatically rather than hacking together with a GUI app.
2. Yes, I am open to something else…

P.S. I’ve tried running the `gvpack -u` instead of the `-array_` flag with the dual graph run, and it overlays the graphs on top, but they’re out of alignment. See below:

 ![model_n2](https://global.discourse-cdn.com/graphviz/original/1X/f513bfc846efa303ae7ebcb2148b1068777774d2.png)
