title: How to avoid Graphviz dot layouts wasting space, with nodes of disparate sizes at the same rank?
body: <p>When one has a graphviz directed graph that is best suited to arrange using dot, is there a way to get around the issue of a large node creating excess padding around other nodes of the same rank?</p>
  
  <p>For example, with the following graph:</p>
  
  <pre><code>digraph {
      b[label="line 1\nline 2\nline 3\nline 4\nline 5\nline 6\n"];
  
      a -&gt; b;
      a -&gt; c;
      b -&gt; f;
      c -&gt; d;
      d -&gt; e;
      e -&gt; f;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/7aZfX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7aZfX.png" alt="(result of the above)"></a></p>
  
  <p>The graph is obviously taller than necessary due to the left-hand path increasing the height of a rank that doesn't need to be so tall in the right-hand path.</p>
  
  <p>Is there perhaps a way to do layout the two paths separately? I thought using cluster subgraphs might help, but it seems that rank heights are completely global even in that case.</p>
  
  <p>I'm hoping for a result akin to this image edit (please excuse it's crudeness):
  <a href="https://i.stack.imgur.com/l1TiF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l1TiF.png" alt="enter image description here"></a></p>