How to avoid overlapping nodes in graphviz?

随声附和 提交于 2019-12-21 07:07:31

问题


I am trying to draw a graph with many nodes and edges.

However, the graph is becoming too clumsy, with nodes and edges overlapping. I tried (unsuccessfully), the following, all or combinations of these.

size = "12.0, 20.0!";
margin  = 0.0;
len = 1.0;

I am using neato to generate a png file.

The size specification did not even seem to work.

Any tips will be appreciated.


回答1:


Try using sfdp or fdp from the same graphviz package. This tools have two parameters K and repulsiveforce which control how far the nodes will be from each other.

Look here for further details




回答2:


Try using SFDP using graph [ overlap=false ].



来源:https://stackoverflow.com/questions/13447538/how-to-avoid-overlapping-nodes-in-graphviz

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!