我无法弄清楚,为什么子图在这里不起作用:
digraph virtPfr {
node [
shape=box
]
Start [
style=rounded,
label="create folder profiles"
]
subgraph asd {
label = "copy files from other profiles"
cpIfDestFilesExist [
label = "Check for file existance"
]
Cp [
label = "Copy"
]
}
Start -> asd
cpIfDestFilesExist -> Start
cpIfDestFilesExist -> Cp
}
但是此代码有效:
digraph G {
node [
shape = "record"
]
Animal [
label = "Animal name and age"
]
subgraph clusterAnimalImpl {
label = "Package animal.tmpl"
Dog [
label = "Dog name and age"
]
Cat [
label = "Cat name and age"
]
}
Dog -> Animal
Cat -> Animal
Dog -> Cat
}
我不明白,与底部图表相比,顶部图表有什么不同,底部有效,但顶部没有。我已经把眼睛拉了出来。我在这里没有看到问题。
请帮助
答案 0 :(得分:1)
有几个问题:
cluster
开头。lhead
/ ltail
解决方法。对于您的图表,它可能如下所示:
digraph virtPfr {
graph [compound=true]
node [
shape=box
]
Start [
style=rounded,
label="create folder profiles"
]
subgraph cluster_asd {
label = "copy files from other profiles"
cpIfDestFilesExist [
label = "Check for file existance"
]
Cp [
label = "Copy"
]
}
Start -> cpIfDestFilesExist [lhead=cluster_asd]
cpIfDestFilesExist -> Start
cpIfDestFilesExist -> Cp
}
生成以下输出: