路由边缘远离DOT中的节点?

QAZ*_*QAZ 3 dot graphviz

我正在使用DOT生成如下所示的有向图.我希望所有边都有一个南尾端口和一个北头端口,因此所有边缘都来自节点的底部并进入节点的顶部.

正如你从左边的图像中看到的那样,从节点2到4和6的边缘沿着节点的一侧直线向上并且看起来不太好,我希望布局会使边缘远离节点(如我右边的图像)

如何将边缘从节点路由出去?

示例图:

在此输入图像描述

我上面图表的DOT文件如下:

digraph g {
graph [
    center=true,
    nodesep=1.2,
    ranksep="1.2 equally",
    sep=6.2,
    splines=polyline
];
node [label="\N"];
0    [area=2,
    fixedsize=true,
    height=0.69444,
    label=0,
    margin=1.2,
    shape=box,
    width=1.3889];
1    [area=2,
    fixedsize=true,
    height=1.3889,
    label=1,
    margin=1.2,
    shape=box,
    width=1.3889];
0:s -> 1:n;
2    [area=2,
    fixedsize=true,
    height=1.3889,
    label=2,
    margin=1.2,
    shape=box,
    color="blue",
    width=1.3889];
0:s -> 2:n;
3    [area=2,
    fixedsize=true,
    height=0.69444,
    label=3,
    margin=1.2,
    shape=box,
    width=1.3889];
0:s -> 3:n;
4    [area=2,
    fixedsize=true,
    height=0.69444,
    label=4,
    margin=1.2,
    shape=box,
    color="red",
    width=1.3889];
1:s -> 4:n;
2:s -> 4:n;
6    [area=2,
    fixedsize=true,
    height=1.3889,
    label=6,
    margin=1.2,
    shape=box,
    color="red",
    width=1.3889];
2:s -> 6:n;
5    [area=2,
    fixedsize=true,
    height=0.69444,
    label=5,
    margin=1.2,
    shape=box,
    width=1.3889];
4:s -> 5:n;
4:s -> 6:n;
7    [area=2,
    fixedsize=true,
    height=0.69444,
    label=7,
    margin=1.2,
    shape=box,
    width=1.3889];
5:s -> 7:n;
6:s -> 7:n;
6:s -> 2:n;
7:s -> 7:n;
8    [area=2,
    fixedsize=true,
    height=0.69444,
    label=8,
    margin=1.2,
    shape=box,
    width=1.3889];
7:s -> 8:n;
}
Run Code Online (Sandbox Code Playgroud)

Han*_*man 5

我能够使用spines = spline在节点和边缘线之间获得所需的分离,但它使边缘线弯曲而不是直线.

graph [
    center=true,
    nodesep=1.2,
    ranksep="1.2 equally",
    sep=6.2,
    splines=spline
];
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述