6
我得到了這個點圖,並希望節點A和D,B和E以及C和F對齊。下面是相關的點代碼:Graphviz節點的點垂直對齊
digraph{
A
B
C
D
E
F
{rank = same; B; C}
{rank = same; E; F}
A -> B [label="2", weight=2]
A -> C [label="0", style=dashed, weight=2]
B -> C [label="0", style=dashed, weight=2]
B -> D [label="2", style=dashed, weight=2]
C -> D [label="0", weight=2]
D -> E [label="1", style=dashed, weight=2]
D -> F [label="0", weight=2]
E -> F [label="0", weight=2]
F -> A
}
正如你可以看到我已經嘗試過的權重應用到邊緣,但沒有制定出