How to force position of edges in graphviz?

匿名 (未验证) 提交于 2019-12-03 03:03:02

问题:

I'm having problems with edges overlapping each other. In my previous question of how to force the nodes to be in the same column, found out how to force the nodes in to one column, but this causes some other problems to appear.

digraph exmp {   A -> B -> C -> D -> E   C -> F [constraint=false]   A -> C [style="dotted", constraint=false]   A -> D [style="dotted",  constraint=false]   B -> D [constraint=false]   D -> A [style="dashed", constraint=false]   C -> A [style="dashed", constraint=false]   E -> F [style="invis"]    F -> G   E -> C [constraint="false"] } 

Renders to:

alt text http://img98.imageshack.us/img98/8324/wrong2.gif

My problem is that the edges from E -> C and C -> F are starting/ending at the same point in the node C and the dashed and dotted edges are all on the right side of the nodes.

How could I tell specific edges to go to the right side of the node?

回答1:

After a message in the graphviz mail list I've found that's at least possible to remove the E -> C and C -> F overlapping problem.

The simplest solution is to use a compass point port:

C:e -> F [constraint=false]

-- Emden



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