title: How to change Graphviz subgraph rank?
body: <p>I want subgraph clusterCG to have same rank as 3 (clusterCG schould not contain 3)</p>
  
  <pre><code>digraph G{
   rankdir = LR;
   node [shape = none]
  
   1-&gt;2-&gt;3-&gt;4[arrowhead=none]
  
   node [shape = ellipse]
  
   A-&gt;A2-&gt;A3;
  
   subgraph clusterCG{
    shape = rect;
    rank=same;
    A2;
    B;
    C;
    color=blue;
    label="C";
   }
  
   { rank=same; 1; A;}
   { rank=same; 3; CG;}
   { rank=same; 4; A3;}
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/4hEgA.png" alt="enter image description here"></p>
  
  <p>CG is generated as independent node with rank 3.</p>
  
  <p>I want the subgraph clusterCG to have rank 3.</p>