我目前有这个集群。
描述如下::
subgraph cluster_Step0 {
compound=true;
style=filled;
color=blue;
start_Step0[color=black, fontsize=8, width=0.3, style=filled, shape=point];
ver_Step0[color=green, fontsize=10, width=4, height=1, style=filled, shape=rectangle];
action_Step0[color=red, fontsize=10, width=4, height=1, style=filled, shape=rectangle];
end_Step0[color=white, fontsize=8, width=0.3, style=filled, shape=point];
// Align
start_Step0, ver_Step0, action_Step0, end_Step0 [group = Step0]
// Connection within the node
start_Step0 -> ver_Step0;
ver_Step0 -> action_Step0;
action_Step0 -> end_Step0;
// node label
label = "Step0";
// VERIFICATION in node
ver_Step0[label="<>"]
// ACTION in node
action_Step0[label="PRECONDITION"]
}
.我想把这个图做得更 "密集 "一些,就像这样:
我试过用ranksep,但没有任何进展。有什么建议吗?
我添加了 graph [ranksep=.1]
它产生了这个。 你是否添加了 排名 图层面的属性?
digraph {
graph [ranksep=.1]
subgraph cluster_Step0 {
compound=true;
style=filled;
color=blue;
start_Step0[color=black, fontsize=8, width=0.3, style=filled, shape=point];
ver_Step0[color=green, fontsize=10, width=4, height=1, style=filled, shape=rectangle];
action_Step0[color=red, fontsize=10, width=4, height=1, style=filled, shape=rectangle];
end_Step0[color=white, fontsize=8, width=0.3, style=filled, shape=point];
// Align
start_Step0, ver_Step0, action_Step0, end_Step0 [group = Step0]
// Connection within the node
start_Step0 -> ver_Step0;
ver_Step0 -> action_Step0
action_Step0 -> end_Step0;
// node label
label = "Step0";
// VERIFICATION in node
ver_Step0[label="<>"]
// ACTION in node
action_Step0[label="PRECONDITION"]
}
}