Dot graph language - how to make bidirectional edges automatically?

后端 未结 2 748
轻奢々
轻奢々 2021-01-31 12:55

Here is a very simplified example of my Dot graph:

strict digraph graphName {
A->B
B->A
}

This creates

2条回答
  •  甜味超标
    2021-01-31 13:37

    How about 'concentrate=true'?:

    strict digraph graphName {
    concentrate=true
    A->B
    B->A
    }
    

    with concentrate=true

    From the documentation:

    If true, use edge concentrators. This merges multiedges into a single edge and causes partially parallel edges to share part of their paths. The latter feature is not yet available outside of dot.

提交回复
热议问题