如何允许 Graphviz 中的重叠边?
背景
我正在使用 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";
}
问题
如何dot
可以在曼哈顿布局中创建正交的肘接边缘吗?
。
我尝试了 sametail
和 tailport
的各种组合,但没有成功
Background
I'm using Graphviz to create an Organizational Chart.
Problem
By default dot
creates the following diagram:
The desired output combines the edges so that they overlap, with elbow connections:
Source Code
The following source code generates the problematic diagram:
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";
}
Question
How can dot
create orthogonal, elbow-joint edges in a Manhattan layout?
Ideas
I have tried various combinations of sametail
and tailport
to no avail.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只有通过插入不可见(“虚拟”)节点才能创建“肘关节”边。
有关详细信息,请参阅类似问题的答案。
Creating "elbow-joint" edges is only possible by inserting invisible ("dummy") nodes.
See the answer to a similar question for details.