【发布时间】:2022-02-11 04:55:16
【问题描述】:
我有一个图表,它使用HTML-like labels 创建表格,其中一些单元格通过边连接。
这很好用,但是当我为两个节点指定rank=same,为连接边指定dir=back 并且至少一个port position 时,边的方向不受尊重。
这显示了example:
digraph so {
// This all works
a -> b [label="Regular direction" dir="forward"]
c -> d [label="Reverse direction", dir="back"]
e:w -> f:w [label="Reverse direction\n + port choice", dir="back"]
g -> h [label="Reverse direction\n + rank=same", dir="back"]
{rank=same; g; h}
// This fails
i:s -> j [label="Reverse direction\n + port choice\n + rank=same", dir="back"]
{rank=same i; j}
}
是否有图形/节点/边选项的组合可以让我在两个节点处于同一等级时从一个节点端口绘制反向边?
我尝试过的
我没有在边缘使用dir=back,而是尝试将arrowhead=none and arrowtail=normal 与dir=both 结合使用。 didn't work either 甚至以某种方式影响了 i -> j 边缘。
digraph so {
// This fails
i:s -> j [label="Reverse direction\n + port choice\n + rank=same", dir="back"]
{rank=same i; j}
// This fails
k:s -> l [label="Reverse direction\n + port choice\n + rank=same\n + arrowhead/tail", arrowhead=none, arrowtail=normal, dir="both"]
{rank=same k; l}
}
【问题讨论】: