How to set the 'spring' force with graphviz for compact graph layouts

穿精又带淫゛_ 提交于 2019-12-03 02:54:25

When using neato, you may fiddle with the overlap and with the sep attribute.

overlap can be set to false, compress, scalexy, and more.

sep may either designate an additive margin when used with a preceding plus sign, otherwise the margin is defined by scaling the node's size with 1 + the value of sep. It seems that the default

Don't hesitate to post a sample graph. Not knowing your particular graph, I made an example containing some big and some small nodes:

layout=neato;
overlap=scalexy; //false, compress, ...
sep="+1"; // 0.1, +1

node[label="Large node", width=2, height=2];
l1; l2; l3;
node[label="\N", width=0.5, height=0.3];
1 -> l1;
2 -> l1;
3 -> l1;
4 -> l1;
5 -> l1;
5 -> l2;
6 -> l2;
7 -> l2;
8 -> l2;
8 -> l3;
9 -> l3;
10 -> l3;

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