# Mediation model

**URL:** https://forum.graphviz.org/t/mediation-model/988
**Category:** Uncategorized
**Created:** [January 5, 2022, 11:32am UTC](https://forum.graphviz.org/t/mediation-model/988 "2022-01-05T11:32:07Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![kasra](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/kasra/32/563_2.png) [@kasra](https://forum.graphviz.org/u/kasra)
#### Post date: [January 6, 2022, 1:20am UTC](https://forum.graphviz.org/t/mediation-model/988/9 "2022-01-06T01:20:23Z")

</div>

I tried a simplified version of your first picture.  
I didn’t check deeply if all the edges are there in the right direction, but it will not be hard to rectify them, I think.

 ![first-shot](https://global.discourse-cdn.com/graphviz/original/1X/a295783e06ea2da5c5f20ff98288ddc7e2eebd8b.png)

**If someone could explain how to get better results with the splines, it would be great !**  
I am really new to Graphviz so I am not even sure if is the right strategy.  
What I so far understood is that when you want a better control to splines trajectory the **neato** layout is better because you can edit the [pos attribute](https://graphviz.org/docs/attrs/pos/) that is valid on **Edges** and **Nodes** for positioning nodes, or spline control points.

[Here an interesting post about splines on this forum](https://forum.graphviz.org/t/the-state-of-splines/366) by [scnorth](https://forum.graphviz.org/u/scnorth/summary)  
It says about the spline fitter :

> There’s a top level, that knows about the graph layout. **It computes a “feasible region” or constraint polygon for the spline, which is a simple polygon that must contain the endpoints**. In dot, the polygon is obtained by first computing a “box path” (a list of boxes that touch sequentially on sides but the direction can change) because it is easy to generate boxes from the levels of the ranked graph. Then there is a phase to walk the boxes and make them into a simple polygon

I am wondering if it’s possible to specify this polygon…

anyway here is the code :

digraph {  
concentrate=true  
ranksep =1.7 nodesep=2  
edge[arrowsize=0.5]  
node[shape=“circle”]  
a b c d e f  
g h i j k l  
{a b c d e f rank=“same”}  
{g h i j k l rank=“same”}  
a → g  
b → h  
c → i  
d → j  
e → k  
f → l  
edge[constraint=false]  
a → b → c → d → e  
g → h → i → j → k → l  
f → e  
a → h  
a → i  
a → j  
a → k  
a → l  
b → i  
b → j  
b → k  
b → l  
c → j  
c → k  
c → l  
a → c  
a → d  
a → e  
f → d  
f → c  
f → b  
f → a  
g → e  
h → e  
i → e  
j → e  
e → l  
i → d  
g → b  
g → c  
d → k  
d → l  
g → d  
g:se → i:s  
g:se → j:s  
g:se → k:s  
g:se → l:s  
h → c  
h → d  
h:s → l:s  
i:s → l:s  
j → l:s  
}

---

_[View the full topic](https://forum.graphviz.org/t/mediation-model/988)._
