gpt4 book ai didi

graphviz - 如何添加“不相关的”边缘

转载 作者:行者123 更新时间:2023-12-03 13:31:02 30 4
gpt4 key购买 nike

我有这张图:

digraph G {
1 [label="car"];
2 [label="x"];
3 [label="car"];
4 [label="y"];
5 [label="cdr"];
6 [label="cdr"];
7 [label="cons"];
8 [label="x1"];
9 [label="x2"];
10 [label="cons"];
11 [label="y1"];
12 [label="y2"];
13 [label="f"];
14 [label="f"];
15 [label="car"];
16 [label="cdr"];
17 [label="car"];
18 [label="cdr"];
1 -> 2;
3 -> 4;
5 -> 2;
6 -> 4;
7 -> 8;
7 -> 9;
10 -> 11;
10 -> 12;
13 -> 2;
14 -> 4;
15 -> 7;
16 -> 7;
17 -> 10;
18 -> 10;
}


我想添加以下其他优势:

1 -> 3 [style="dashed"];
2 -> 7 [style="dashed"];
3 -> 8 [style="dashed"];
4 -> 10 [style="dashed"];
5 -> 6 [style="dashed"];
6 -> 9 [style="dashed"];
7 -> 10 [style="dashed"];
8 -> 11 [style="dashed"];
9 -> 12 [style="dashed"];
13 -> 14 [style="dashed"];
15 -> 8 [style="dashed"];
16 -> 9 [style="dashed"];
17 -> 11 [style="dashed"];
18 -> 12 [style="dashed"];


但不更改布局。
我尝试将边缘权重设置为0,但这不起作用。

谢谢

最佳答案

您可以简单地添加

edge[constraint=false];


在添加无关边之前。

没有:



带有边缘:



(似乎仍然有一些小的变化)

关于graphviz - 如何添加“不相关的”边缘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6043888/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com