How to control node placement in graphviz (i.e. avoid edge crossings)

前端 未结 4 846
醉话见心
醉话见心 2021-01-30 09:12

I\'m using graphviz (dot) to generate the graph you can see below. The node in the lower left corner (red ellipse) causes annoyance as its edges cross several edges of the adjac

4条回答
  •  迷失自我
    2021-01-30 09:15

    I like @smokris' [style=invis] trick for persuading graphviz to put things where you want them, by adding edges which affect layout but aren't visible.


    Another trick is the constraint attribute, which lets you add edges which are visible but don't affect layout.

    If adding a new edge messes up your graph, set [constraint=false] on that edge: now graphviz will ignore it when placing nodes.

提交回复
热议问题