graphviz - 使用graphviz时如何避免边和节点重叠?

标签 graphviz dot

如标题,我想画一个ELF文件格式的图像。ELF头有程序头表和节头表的偏移,所以我想用两个箭头指针来指出关系。但是边缘重叠节点(记录)即使在我设置了overlap=false和splines=true之后。我已经搜索了一段时间,但我的情况是箭头有点指向其自身的一部分。

以下是我用来生成 png 文件的点文件。

digraph g {
//margin="1"
overlap='scale'
graph [rankdir="LR"]

"ELF File" [
label="<f0> ELF Header\n e_shoff=0x118| <f1> Program Headers Table | <f2> .text | <f3> .data | <f4> .rodata| <f5> .comment | <f6> .shstrtab | <f8> .symtab | <f9> .rel.text | <f7> Section Table"
shape="record"
];

"ELF File":f0 -> "ELF File":f1 [label="e_phoffset"]
"ELF File":f0 -> "ELF File":f7 [label="e_shoff"]
}

最佳答案

一种可能的解决方案是在其中一条边上使用“东”节点端口,以便该边出现在记录的另一侧。您可以通过将 :e 附加到节点名称来完成此操作。例如:

"ELF File":f0:e -> "ELF File":f7:e [label="e_shoff"]

关于graphviz - 使用graphviz时如何避免边和节点重叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3642649/

相关文章:

graphviz - 标签超链接Graphviz

c++ - 使用 Doxygen + Graphviz 可视化一个巨大的 C++ 项目

graphviz - 在graphviz : can I have node ids that are unique within clusters only?

user-interface - DOT语言的GUI编辑器(Mac OS)

GraphViz 用点保持节点位置

Python Networkx graphviz : Plot right position of nodes

Graphviz:将边缘标签放在另一侧

java - 如何在点文件 node_id 中使用特殊字符?

python - graph.write_pdf ("iris.pdf") AttributeError : 'list' object has no attribute 'write_pdf'

c# - GraphViz 和 ASP.NET