【发布时间】:2020-10-12 03:17:05
【问题描述】:
我的代码是:
digraph G {
rankdir=LR
node [color=black,shape=record]
node0 [label="{<data>node 0|<next>}"]
node1 [label="{<data>node 1|<next>}"]
new_node [label="{<data>new_node|<next>}"]
null0 [shape=none, label="NULL"]
null1 [shape=none, label="NULL"]
head [shape=none, label="head"]
ptr [shape=none, label="ptr"]
indirect [shape=none]
head->ptr
indirect->node0:next [constraint=false headport=s tailport=n];
ptr->node0
node0:next:c->node1 [arrowhead=normal, arrowtail=dot, dir=both, tailclip=false];
node1:next:c -> null0 [tailclip=false, arrowtail=dot, dir=both]
new_node:next:c->null1 [arrowhead=normal, arrowtail=dot, dir=both, tailclip=false];
{rank=same; indirect node1;}
}
我希望node0 和间接在同一级别上。但是,当我改变时
{rank=same; indirect node1;} -> {rank=same; indirect node0;}
他们会有错误信息:"Error: lost indirect node0 edge"
我想要的实际图表:
【问题讨论】:
-
有趣。使用 2version 2.40.1 我得到“警告:相邻节点之间的平坦边缘,其中一个具有记录形状 - 用类似 HTML 的标签替换记录边缘间接 - > node0 错误:丢失间接 node0 边缘”并且边缘消失了。在 2.38.0 版本中,我收到“警告:无法在边缘“间接”->“node0”的样条路由中回收框空间。可能有严重错误。”并且存在边缘。也许值得在gitlab.com/graphviz/graphviz查看GraphViz问题/存储库@
标签: linked-list graphviz hackmd