垂直对齐和不可见点
Vertical Alignment and Invisiable Dot
正在尝试将所有粗边框项目垂直对齐。我该怎么做?
此外,我正在尝试让两条线合二为一的空点消失,以便连接边缘。它们由“i*”命名约定表示。为此,我希望这两行重新合并在一起,然后附加到下一个项目。我尝试了 concentrate = "true"
但没有按预期工作。线条基本上没有重新合并在一起。
digraph G {
concentrate = "true";
node[shape="box", style="rounded"];
{
start [penwidth = 2.0];
end [penwidth = 2.0];
}
// PROCESS
node[shape="box"];
{
calc [label = "Calculate\nSelected\nValues", penwidth = 2.0];
deployPara [label = "Deploy\nPatachute" ];
bldMsg [label = "Build\nMessage"];
sendMsg [label = "Transmit\nMessage"];
sleepCycle [label = "Sleep\nCycle", penwidth=2];
}
// Decision
node[shape="diamond", style=""]
{
decidePara [label = "Decide\nDeploy", penwidth=2];
decideMsg [label = "Decide\nMessage", penwidth=2];
}
node[shape = point, width = 0, height = 0];
{
iDeploy
iMsg
}
start -> decidePara
decidePara -> iDeploy [label = "No", arrowhead = "none"]
decidePara -> deployPara [label = "Yes"]
deployPara -> iDeploy [arrowhead = "none"]
iDeploy -> decideMsg ;
decideMsg -> iMsg [label = "No", arrowhead = "none"];
decideMsg -> bldMsg [label = "Yes"];
bldMsg -> sendMsg;
sendMsg -> iMsg [arrowhead = "none"]
iMsg -> sleepCycle
sleepCycle -> end;
{rank=same; decidePara deployPara}
{rank=same; decideMsg bldMsg sendMsg}
}
编辑图片评论者看到的是:
变化:
- splines=false(假设你想要直线)
- 给所有需要对齐的节点一个组属性(参见https://graphviz.org/docs/attrs/group/)
- 更改了 i* 个节点的大小以填补空白
- 还使用了头夹和尾夹属性(https://graphviz.org/docs/attrs/headclip/)来填补空白(不确定是否需要)
digraph G {
concentrate = "true";
splines=false
node[shape="box", style="rounded"];
{
start [penwidth = 2.0 group=S];
end [penwidth = 2.0 group=S];
}
// PROCESS
node[shape="box"];
{
calc [label = "Calculate\nSelected\nValues", penwidth = 2.0];
deployPara [label = "Deploy\nPatachute" ];
bldMsg [label = "Build\nMessage"];
sendMsg [label = "Transmit\nMessage"];
sleepCycle [label = "Sleep\nCycle", penwidth=2 group=S];
}
// Decision
node[shape="diamond", style=""]
{
decidePara [label = "Decide\nDeploy", penwidth=2 group=S];
decideMsg [label = "Decide\nMessage", penwidth=2 group=S];
}
node[shape = point, width = .01, height = .01 group=S];
{
iDeploy
iMsg
}
start -> decidePara
decidePara -> iDeploy [label = "No", arrowhead = "none" headclip=false]
decidePara -> deployPara [label = "Yes"]
deployPara -> iDeploy [arrowhead = "none" headclip=false]
iDeploy -> decideMsg [tailclip=false]
decideMsg -> iMsg [label = "No", arrowhead = "none" headclip=false];
decideMsg -> bldMsg [label = "Yes"];
bldMsg -> sendMsg;
sendMsg -> iMsg [arrowhead = "none"]
iMsg -> sleepCycle [tailclip=false]
sleepCycle -> end;
{rank=same; decidePara deployPara}
{rank=same; decideMsg bldMsg sendMsg}
}
给予:
正在尝试将所有粗边框项目垂直对齐。我该怎么做?
此外,我正在尝试让两条线合二为一的空点消失,以便连接边缘。它们由“i*”命名约定表示。为此,我希望这两行重新合并在一起,然后附加到下一个项目。我尝试了 concentrate = "true"
但没有按预期工作。线条基本上没有重新合并在一起。
digraph G {
concentrate = "true";
node[shape="box", style="rounded"];
{
start [penwidth = 2.0];
end [penwidth = 2.0];
}
// PROCESS
node[shape="box"];
{
calc [label = "Calculate\nSelected\nValues", penwidth = 2.0];
deployPara [label = "Deploy\nPatachute" ];
bldMsg [label = "Build\nMessage"];
sendMsg [label = "Transmit\nMessage"];
sleepCycle [label = "Sleep\nCycle", penwidth=2];
}
// Decision
node[shape="diamond", style=""]
{
decidePara [label = "Decide\nDeploy", penwidth=2];
decideMsg [label = "Decide\nMessage", penwidth=2];
}
node[shape = point, width = 0, height = 0];
{
iDeploy
iMsg
}
start -> decidePara
decidePara -> iDeploy [label = "No", arrowhead = "none"]
decidePara -> deployPara [label = "Yes"]
deployPara -> iDeploy [arrowhead = "none"]
iDeploy -> decideMsg ;
decideMsg -> iMsg [label = "No", arrowhead = "none"];
decideMsg -> bldMsg [label = "Yes"];
bldMsg -> sendMsg;
sendMsg -> iMsg [arrowhead = "none"]
iMsg -> sleepCycle
sleepCycle -> end;
{rank=same; decidePara deployPara}
{rank=same; decideMsg bldMsg sendMsg}
}
编辑图片评论者看到的是:
变化:
- splines=false(假设你想要直线)
- 给所有需要对齐的节点一个组属性(参见https://graphviz.org/docs/attrs/group/)
- 更改了 i* 个节点的大小以填补空白
- 还使用了头夹和尾夹属性(https://graphviz.org/docs/attrs/headclip/)来填补空白(不确定是否需要)
digraph G {
concentrate = "true";
splines=false
node[shape="box", style="rounded"];
{
start [penwidth = 2.0 group=S];
end [penwidth = 2.0 group=S];
}
// PROCESS
node[shape="box"];
{
calc [label = "Calculate\nSelected\nValues", penwidth = 2.0];
deployPara [label = "Deploy\nPatachute" ];
bldMsg [label = "Build\nMessage"];
sendMsg [label = "Transmit\nMessage"];
sleepCycle [label = "Sleep\nCycle", penwidth=2 group=S];
}
// Decision
node[shape="diamond", style=""]
{
decidePara [label = "Decide\nDeploy", penwidth=2 group=S];
decideMsg [label = "Decide\nMessage", penwidth=2 group=S];
}
node[shape = point, width = .01, height = .01 group=S];
{
iDeploy
iMsg
}
start -> decidePara
decidePara -> iDeploy [label = "No", arrowhead = "none" headclip=false]
decidePara -> deployPara [label = "Yes"]
deployPara -> iDeploy [arrowhead = "none" headclip=false]
iDeploy -> decideMsg [tailclip=false]
decideMsg -> iMsg [label = "No", arrowhead = "none" headclip=false];
decideMsg -> bldMsg [label = "Yes"];
bldMsg -> sendMsg;
sendMsg -> iMsg [arrowhead = "none"]
iMsg -> sleepCycle [tailclip=false]
sleepCycle -> end;
{rank=same; decidePara deployPara}
{rank=same; decideMsg bldMsg sendMsg}
}
给予: