Ada*_*tan 8 macos svg png image graphviz
我试图在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];
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,图片没有出现:

我使用以下方法编译了点文件:
dot -v -Tpng list.dot -o list.png
Run Code Online (Sandbox Code Playgroud)
我的代码,包括png图像,存储在github中.
如何在d自定义图像中使用替换节点?
mar*_*pet 10
只需为此节点定义其他形状,例如shape=none:
d [shape=none, label="", image="X_Shape_Pillar_Yellow.png"];
Run Code Online (Sandbox Code Playgroud)
的record定义为默认形状不显示图像,而none,box甚至plaintext做.
同时,将标签设置为空可能是个好主意.