gpt4 book ai didi

graph - 如何让双向连接集中在集群之间?

转载 作者:行者123 更新时间:2023-12-05 07:48:35 25 4
gpt4 key购买 nike

取下面的二合字母:

digraph "all"{

subgraph "cluster cluster 1" {
node [label="1"] "1"
node [label="2"] "2"
}

subgraph "cluster cluster 2" {
node [label="3"] "3"
node [label="4"] "4"
}

1 -> 2
2 -> 1

3 -> 4
4 -> 3

}

enter image description here

为了将双向连接变成单箭头,
我必须使用 concentrate=true;

digraph "all"{

subgraph "cluster cluster 1" {
node [label="1"] "1"
node [label="2"] "2"
}

subgraph "cluster cluster 2" {
node [label="3"] "3"
node [label="4"] "4"
}

1 -> 2
2 -> 1

3 -> 4
4 -> 3

concentrate=true;

}

enter image description here

这适用于单个集群,但不适用于跨集群。
我也尝试在其他地方洒上 concentrate=true,但没有用。

digraph "all"{

subgraph "cluster cluster 1" {
node [label="1"] "1"
node [label="2"] "2"
concentrate=true;
}

subgraph "cluster cluster 2" {
node [label="3"] "3"
node [label="4"] "4"
concentrate=true;
}

1 -> 2
2 -> 1

3 -> 4
4 -> 3

2 -> 3
3 -> 2

concentrate=true;

}

enter image description here
如何集中有向图簇之间的连接?

最佳答案

使用连接修饰符[dir=both]

2 -> 3 [dir=both]

然后您可以从 3 -> 2 中删除链接

关于graph - 如何让双向连接集中在集群之间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38335232/

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