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

前端 未结 4 860
醉话见心
醉话见心 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条回答
  •  旧时难觅i
    2021-01-30 09:22

    @Jannis, in case you're still interested in an answer to this, there is actually a way to control individual node placement - you use the "pos" attribute:

    http://www.graphviz.org/doc/info/attrs.html#d:pos

    As an example of this, you could write:

    n [pos="3,5!"];
    

    That would force node n to be at precisely (3,5).

    However, this only works with layout engines "fdp" and "neato".

提交回复
热议问题