graphviz-减少集群内节点的距离(但保持对齐)
我目前拥有以下群集: 描述如下:graphviz-减少集群内节点的距离(但保持对齐),graph,nodes,graphviz,edges,Graph,Nodes,Graphviz,Edges,我目前拥有以下群集: 描述如下: 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=fil
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"]
}
子图簇\u步骤0{
复合=真;
样式=填充;
颜色=蓝色;
开始步骤0[颜色=黑色,字体大小=8,宽度=0.3,样式=填充,形状=点];
ver_Step0[颜色=绿色,字体大小=10,宽度=4,高度=1,样式=填充,形状=矩形];
操作步骤0[颜色=红色,字体大小=10,宽度=4,高度=1,样式=填充,形状=矩形];
结束步骤0[颜色=白色,字体大小=8,宽度=0.3,样式=填充,形状=点];
//对齐
开始步骤0,结束步骤0,动作步骤0,结束步骤0[组=步骤0]
//节点内的连接
开始第0步->第0步;
ver_Step0->action_Step0;
操作步骤0->结束步骤0;
//节点标签
label=“Step0”;
//节点中的验证
第0步[标签=”]
//节点中的操作
操作步骤0[标签=“前提条件”]
}
。
我想让图表更“密集”。大概是这样的:
我试过使用ranksep,但没有任何效果。有什么建议吗?
thx我添加了
图形[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"]
}
}
有向图{
图[ranksep=.1]
子图簇0{
复合=真;
样式=填充;
颜色=蓝色;
开始步骤0[颜色=黑色,字体大小=8,宽度=0.3,样式=填充,形状=点];
ver_Step0[颜色=绿色,字体大小=10,宽度=4,高度=1,样式=填充,形状=矩形];
操作步骤0[颜色=红色,字体大小=10,宽度=4,高度=1,样式=填充,形状=矩形];
结束步骤0[颜色=白色,字体大小=8,宽度=0.3,样式=填充,形状=点];
//对齐
开始步骤0,结束步骤0,动作步骤0,结束步骤0[组=步骤0]
//节点内的连接
开始第0步->第0步;
ver_Step0->action_Step0
操作步骤0->结束步骤0;
//节点标签
label=“Step0”;
//节点中的验证
第0步[标签=”]
//节点中的操作
操作步骤0[标签=“前提条件”]
}
}
我想我没有。我在哪里以及如何添加此贡品?