0
My圖表:如何在graphviz中製作此圖?
我可以通過設置每個頂點的座標做到這一點。但我不知道如何設置像素座標。
我嘗試這樣做:
digraph {
node [shape=circle]
edge [arrowhead=none]
rankdir = BT;
0 -> {1; 2;}
1 -> {3; 4;}
2 -> {4; 8;}
3 -> {9; 5;}
4 -> {5; 10;}
5 -> 11
6 -> {7; 12; 8;}
7 -> {9; 10}
8 -> {10; 14}
9 -> {15; 11}
10 -> {11; 16}
11 -> 17
12 -> {13; 14}
13 -> {15; 16}
14 -> 16
15 -> 17
16 -> 17
0 [pos = "5,0!"]
1 [pos = "4,1!"]
2 [pos = "6,1!"]
3 [pos = "3,2!"]
4 [pos = "5,2!"]
5 [pos = "4,3!"]
6 [pos = "6,3!"]
7 [pos = "4,4!"]
8 [pos = "6,4!"]
9 [pos = "3,5!"]
10 [pos = "5,5!"]
11 [pos = "4,6!"]
12 [pos = "6,6!"]
13 [pos = "4,7!"]
14 [pos = "6,7!"]
15 [pos = "3,8!"]
16 [pos = "5,8!"]
17 [pos = "4,9!"]
}
我改名爲節點與數量的字母。
結果: