top-down subgraphs, left-right inside subgraphs

前端 未结 4 956
滥情空心
滥情空心 2021-01-31 03:14

I\'d like to have my graph looks like this:

But I can only get this:

4条回答
  •  失恋的感觉
    2021-01-31 03:44

    Using constraint=false should get the nodes in your subgraphs to turn out the way you want http://www.graphviz.org/doc/info/attrs.html#d:constraint

    subgraph clusterB {
        label=B
        "0B"
        "1B"
        "2B" -> "0B" [constraint=false label=•]
    }
    

    After that you'll find that your subgraphs don't line up with each other the way you want. Something like this could resolve that.

    "0A" -> "0B" -> "0C" -> "0D" -> "0E" [weight=999 style=invis];
    

提交回复
热议问题