Search code examples
graphvizdotflowchart

Vertical Alignment and Invisiable Dot


Trying to put all thick bordered items into a vertical alignment. How do I do this?

Also, I'm trying to get the empty dot, where the two lines combine into one, to go away so the edges are connected. They are denoted by the "i*" naming convention. Specifically for this, I want the two lines to merge back together then attach to the next item. I tried the concentrate = "true" and that did not work as expected. The lines basically did not merge back together.

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

Edit the image commenter sees is:

enter image description here


Solution

  • Changes:

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

    Giving:
    enter image description here