【发布时间】:2013-03-19 20:37:30
【问题描述】:
我想画一个垂直对齐的链表,就像来自 Wikimedia Commons 的链表:
到目前为止我最好的镜头是:
digraph foo {
rankdir=LR;
node [shape=record];
a [label="{ <data> 12 | <ref> }"]
b [label="{ <data> 99 | <ref> }"];
c [label="{ <data> 37 | <ref> }"];
d [shape=box];
a:ref -> b:data [arrowhead=vee, arrowtail=dot, dir=both];
b:ref -> c:data [arrowhead=vee, arrowtail=dot, dir=both];
c:ref -> d [arrowhead=vee, arrowtail=dot, dir=both];
}
这给出了:
如何将箭头点设置为源自记录内,并将d 记录设置为X 节点?
我试过tailclip=false,但没有成功。
【问题讨论】:
-
试过
tailclip=false,没有运气 - 更新了我的问题。 -
使用 TikZ 而不是 GraphViz 的解决方案(虽然我个人喜欢 GraphViz!):tex.stackexchange.com/questions/19286/…
-
这是我遗漏的
:c部分,谢谢。
标签: linked-list graphviz