title: Padding between cluster boundaries and nodes when using Graphviz and neato
body: <p>I want to generate the following graph in Graphviz:</p>
  
  <p><img src="https://i.stack.imgur.com/gd4kV.png" alt="Desired layout"></p>
  
  <p>For reasons explained <a href="https://stackoverflow.com/questions/9587468">here</a>, this:</p>
  
  <pre><code>digraph
  {
     layout=dot;
     rankdir="LR";
     overlap = true;
     node[shape=record, height="0.4", width="0.4"];
     edge[dir=none];
  
     A; B; C; D; E; F; G; H; I;
  
     A -&gt; B -&gt; C;
     D -&gt; E -&gt; F;
     G -&gt; H -&gt; I;
     edge[constraint=false];
     A -&gt; D -&gt; G;
  
     subgraph clusterX
     {
        label="Cluster 1";
        A; B;
     }
  
     subgraph clusterY
     {
        label="Cluster 2";
        E; F; H; I;
     }
  
  }
  </code></pre>
  
  <p>produces this:</p>
  
  <p><img src="https://i.stack.imgur.com/6bavr.png" alt="Not desired layout"></p>
  
  <p>Following <a href="https://stackoverflow.com/questions/9587468">some careful tweaking of the order of appearance of nodes</a>: </p>
  
  <pre><code>   F; E; I; H; D; G; A; B; C;
  </code></pre>
  
  <p>I get the correct result.</p>
  
  <p>While this works, I would like more direct control over the placement of nodes, so I tried switching to neato so that I can force the node locations using pos:</p>
  
  <pre><code>graph g
  {
     layout=neato;
     node[shape=record, height="0.4", width="0.4"];
     edge[dir=none];
  
     A [pos="1,3!"];
     B [pos="2,3!"];
     C [pos="3,3!"];
     D [pos="1,2!"];
     E [pos="2,2!"];
     F [pos="3,2!"];
     G [pos="1,1!"];
     H [pos="2,1!"];
     I [pos="3,1!"];
  
     A -- B -- C;
     D -- E -- F;
     G -- H -- I;
     A -- D -- G;
  
     subgraph clusterX
     {
        label="Cluster 1";
        A;
        B;
     }
  
     subgraph clusterY
     {
        label="Cluster 2";
        E; F; H; I;
     }
  }
  </code></pre>
  
  <p>This gives the following result:</p>
  
  <p><img src="https://i.stack.imgur.com/1k3Fc.png" alt="enter image description here"></p>
  
  <p>How can I get neato to add padding between the cluster boundaries and the nodes within the cluster (in the same way that dot does)?</p>