我曾尝试在Graphviz中使用自定义图像节点(节点d
):
digraph foo {
rankdir=LR;
node [shape=record];
a [label="{ <data> 12 | <ref> }", width=1.2]
b [label="{ <data> 99 | <ref> }"];
c [label="{ <data> 37 | <ref> }"];
d [image="X_Shape_Pillar_Yellow.png"];
a:ref:c -> b:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false, arrowsize=1.2];
b:ref:c -> c:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false];
c:ref:c -> d [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false];
}
很遗憾,这张图片无法显示:
我使用以下方式编译了dot文件:
dot -v -Tpng list.dot -o list.png
我的代码,包括png图片,存储在Github上。
如何使用自定义图像替换节点d
?