Dot graph language - how to make bidirectional edges automatically?

后端 未结 2 692
轻奢々
轻奢々 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.

    0 讨论(0)
  • 2021-01-31 13:42

    You should just use:

    A -> B [dir=both]
    
    0 讨论(0)
提交回复
热议问题