两个子图中的相同节点 [英] Same node in two subgraphs
问题描述
我想在两个子图之间绘制边框,但是我有一个属于这两个子图的节点.
I want to draw a border around two subgraphs but I have one node that belongs to both.
digraph {
subgraph cluster_0 {
color = red
A -> D
A -> C
C -> D
}
subgraph cluster_1 {
color = blue
B -> C
B -> E
C -> E
}
}
现在 C
应该是两个集群的一部分-相反,我得到了:
Now C
should be part of both Clusters - instead I get this:
推荐答案
节点的名称/标签与其标识之间存在区别.当节点没有名称/标签时,将其标识作为名称/标签.
There s a difference between tha name / label of a node and its identification. When a node has no name / label ithe identification is taken as name / label.
不确定以下内容是否符合您的意图(否则请澄清您的问题).
Not sure if the following is what uou intended (otherwise clarify you question).
digraph {
subgraph cluster_0 {
color = red
A -> D
A -> C
C -> D
}
subgraph cluster_1 {
color = blue
node C2 [label="C"]
B -> C2
B -> E
C2 -> E
}
}
从OP的评论中(图像应该在原始问题中),看起来OP想要更多类似的东西:
From the comment of OP (image should be in original question) looks like OP wants something more like:
digraph {
subgraph cluster_2 {
color = none;
node C
}
subgraph cluster_0 {
color = red
A -> D
A -> C
C -> D
}
subgraph cluster_1 {
color = blue
B -> C
B -> E
C -> E
}
}
此图像不能提供OP想要的确切图片,但我认为一个方向并带有一些跑步设置以及一些隐藏的节点和边缘,它应该可以提供正确的图片.
this image does not provide the exact picture OP wants but I think a direction and with some ran setting together with some hidden nodes and edges it should give the right picture.
这篇关于两个子图中的相同节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!