【问题标题】:Vertical Alignment and Invisiable Dot垂直对齐和隐形点
【发布时间】:2022-01-18 01:28:50
【问题描述】:

尝试将所有粗边框项目放入垂直对齐。我该怎么做?

另外,我试图让两条线合二为一的空点消失,以便连接边缘。它们由“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}
}

编辑评论者看到的图片是:

【问题讨论】:

  • 你看到了什么?问题是什么(也许在您的可选问题中用图片说明。
  • 我尝试添加图片,但愚蠢的网站不允许我这样做,而且我在建议的托管网站上遇到了问题。肯定是星期一...基本上,不可见节点位于喜欢它们的两个节点之间,并且节点本身有一个小段,其中 3 条边不相交。
  • 我刚刚添加的图像是你所看到的关于“差距”的图像
  • 是的,没错

标签: graphviz dot flowchart


【解决方案1】:

变化:

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}
}

捐赠:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-16
    • 1970-01-01
    • 2021-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多