Space 约 html 个节点
Space around html nodes
如何使链接连接 HTML 个节点的边界?
graph {
node[shape=plaintext];
Object1[label=<<table><tr><td>Object1</td></tr></table>>];
Object2[label=<<table><tr><td>Object2</td></tr></table>>];
Link[shape="diamond", label="Link"];
Object1 -- Link;
Object2 -- Link;
}
编译:dot -Tpng file.gv
Result : 对象边界离链接末端有点远。
使用 TD 单元格内的引用 "port" 找到了可接受的解决方案:
graph {
node[shape=plaintext];
Object1[label=<<table border="0"><tr><td border="1" port="f1">Object1</td></tr></table>>];
Object2[label=<<table border="0"><tr><td border="1" port="f2">Object2</td></tr></table>>];
Link[shape="diamond", label="Link"];
Object1:f1 -- Link;
Object2:f2 -- Link;
}
(灵感来自文档页面末尾附近的示例 https://www.graphviz.org/doc/info/shapes.html)
Result
如何使链接连接 HTML 个节点的边界?
graph {
node[shape=plaintext];
Object1[label=<<table><tr><td>Object1</td></tr></table>>];
Object2[label=<<table><tr><td>Object2</td></tr></table>>];
Link[shape="diamond", label="Link"];
Object1 -- Link;
Object2 -- Link;
}
编译:dot -Tpng file.gv
Result : 对象边界离链接末端有点远。
使用 TD 单元格内的引用 "port" 找到了可接受的解决方案:
graph {
node[shape=plaintext];
Object1[label=<<table border="0"><tr><td border="1" port="f1">Object1</td></tr></table>>];
Object2[label=<<table border="0"><tr><td border="1" port="f2">Object2</td></tr></table>>];
Link[shape="diamond", label="Link"];
Object1:f1 -- Link;
Object2:f2 -- Link;
}
(灵感来自文档页面末尾附近的示例 https://www.graphviz.org/doc/info/shapes.html)
Result