graphviz - 减少集群内节点的距离(但保持对齐)
graphviz - reduce distance of node inside cluster (but keep them aligned)
我目前有这个集群:
.
描述如下:
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"]
}
。
我想让图表明显更多 "dense"。像这样:
我已经尝试使用 ranksep,但没有任何变化。有什么建议么?
谢谢
我添加了 graph [ranksep=.1]
,它产生了这个:
您是否在图表级别添加了 ranksep 属性?
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"]
}
}
我目前有这个集群:
描述如下:
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"]
}
。 我想让图表明显更多 "dense"。像这样:
我已经尝试使用 ranksep,但没有任何变化。有什么建议么? 谢谢
我添加了 graph [ranksep=.1]
,它产生了这个:
您是否在图表级别添加了 ranksep 属性?
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"]
}
}