graphviz 填充两个边界(外围)之间的间隙

graphviz fill gap between two borders (peripheries)

digraph {
graph[bgcolor="gold1:dodgerblue"]
node[shape=box;style="filled";];
edge[color="#000080";arrowhead="open";];

A [peripheries=2;color="blue:green:blue";fillcolor="#ddffff";];
B [fillcolor="#ddffff";];
A->B
}

输出第一张图片。如何填空得到第二张图?

暂无解决方案。找到了另一种突出显示节点的方法:

digraph {
graph[imagepath=".";];
graph[layout=dot;rankdir=LR;];
node[shape=box;style="filled";];
node[shape=box;style="filled";penwidth="0.5";width=0;height=0;margin="0.05,0.05"];
edge[color="#000080";arrowhead="open";];

A [fillcolor="#ffddff";label="Marked node";image="rect2681.png";imagepos="tl";margin="0.2,0.05"];
B [fillcolor="#ddffff";label="Ordinary node";];
A->B
}

graphviz-2.44.1 工作。在 graphviz-2.38 中(在 graphviz-2.40.1 中,我可以签入 Ubuntu)图像总是位于中心,即 imagepos 不起作用。

另见 the documentation

更新

graphviz-2.44.1 中发现了一些问题,因此需要返回 graphviz-2.38 并使用 HTML-Like Labels:

digraph {
graph[imagepath=".";];
graph[layout=dot;rankdir=LR;];
node[shape=box;style="filled";];
node[shape=box;style="filled";penwidth="0.5";width=0;height=0;margin="0.05,0.05"];
edge[color="#000080";arrowhead="open";];

A [fillcolor="#ffddff";label=< <table cellpadding="0" cellspacing="0" border="0">
<tr><td><img src="circle_mark.png"/></td>
<td cellpadding="5">Marked node</td></tr>
</table> >; margin="0.04,0"];
B [fillcolor="#ddffff";label="Ordinary node";];
A->B
}

仍未找到确切的解决方案,但 HTML-Like Labels 提供了视觉上等效的解决方法。虽然代码非常冗长,但它适合我的情况。

digraph {
graph[imagepath=".";];
graph[layout=dot;rankdir=LR;];
node[shape=box;style="filled";];
node[shape=box;style="filled";penwidth="1";width=0;height=0;margin="0.05,0.05"];
edge[color="#000080";arrowhead="open";];

A [fillcolor="yellow";label=< <table cellpadding="0" cellspacing="0" border="1" bgcolor="#ffddff">
<tr><td cellpadding="5" border="0">Marked node</td></tr>
</table> >;];

B [fillcolor="#ddffff";label="Ordinary node";];

A->B
}