digraph G {
compound=true;
subgraph SJC {
node [style="filled"];
label = "SJC";
channel [shape=cylinder];
}
subgraph Fleet {
node [style="filled"];
App1 [shape=cylinder];
App2 [shape=cylinder];
App3 [shape=cylinder];
label = "Fleet of machines";
style="filled";
color="lightgrey";
}
App1 -> channel [ltail=SJC, lhead=Fleet];
}
使用上面的代码,我的期望是获得对应于子图的2个容器盒。但是,我得到的图像如下:
另外,我收到两个警告。
Warning: cluster named Fleet not found
Warning: cluster named SJC not found
答案 0 :(得分:2)
有两个错误:
答案 1 :(得分:2)
以下是您更正后的代码:
digraph G {
compound=true;
subgraph cluster_SJC {
node [style="filled"];
label = "SJC";
channel [shape=cylinder];
}
subgraph cluster_Fleet {
node [style="filled"];
App1 [shape=cylinder];
App2 [shape=cylinder];
App3 [shape=cylinder];
label = "Fleet of machines";
style="filled";
color="lightgrey";
}
App1 -> channel [lhead=cluster_SJC, ltail=cluster_Fleet];
}
我的“气缸”呈现为方框。从来没有让圆柱形状在graphviz 2.38.0中工作。