使用graphviz创建组织结构图.
默认情况下,dot创建以下图表:

所需的输出结合边缘,使它们重叠,与弯头连接:

以下源代码生成有问题的图表:
digraph G {
splines = ortho;
concentrate = true;
node [shape="box", style="rounded", penwidth = 2];
edge [color="#142b30", arrowhead="vee", penwidth = 2];
{
rank = same
"1";
"2";
"3";
"4";
}
"Main Node" -> "1";
"Main Node" -> "2";
"Main Node" -> "3";
"Main Node" -> "4";
{
rank = same
"5";
"6";
"7";
}
"1" -> "5";
"1" -> "6";
"1" -> "7";
}
Run Code Online (Sandbox Code Playgroud)
如何dot在曼哈顿布局中创建正交的肘关节边缘?
我曾尝试各种组合sametail …
在Graphviz/dot中,是否可以将边缘准确地连接到节点的顶部中心?阅读点指南,我想,tailport并headport会帮助我,但添加这些没有区别,有时让我更奇怪的结果.
这就是我得到的:

这就是我要找的东西:

我用来获取(不正确)图表的代码是:
digraph G {
graph [splines = ortho];
node [shape = box];
edge [dir = none];
{
rank = same
A
AB [shape = point]
B
A -> AB
AB -> B
}
{
rank = same
point1 [shape = point]
point2 [shape = point]
point3 [shape = point]
}
AB -> point1
// The following section if to make the nodes appear in
// the correct order, not sure if there's a …Run Code Online (Sandbox Code Playgroud)