title: Clustering subgraphs with singleton/unconnected nodes using neato engine in Graphviz
body: <p>I'm hoping to generate two subgraphs with the Graphviz <code>neato</code> engine.  One subgraph will contain nodes that are connected to each other, the other will contain singleton nodes that aren't connected to any other nodes.  I have adjusted <a href="https://graphviz.gitlab.io/_pages/Gallery/directed/cluster.html" rel="nofollow noreferrer">this</a> example from the Graphviz website below: </p>
  
  <pre><code>digraph G {
      node [shape = circle];
      edge [arrowhead = normal, label="", color="#919191"];
  
      subgraph cluster_0 {
          color=lightgrey;
          label="Singletons";
          a0;
          a1;
          a2;
          a3;
      }
  
      subgraph cluster_1 {
          color=lightgrey;
          label="Non-singletons";
          b0 -&gt; b1;
          b2 -&gt; b3;
      }
  }
  </code></pre>
  
  <p>Which gives the following graph when processed with the <code>neato</code> engine where the nodes in each subgraph aren't clustered together.   </p>
  
  <pre><code>neato -Tpng test.dot &gt; test_neato.png
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tKw9y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tKw9y.png" alt="enter image description here"></a></p>
  
  <p>Processing with the <code>dot</code> engine gives alright results but I need to generate networks with a large number of nodes and the <code>neato</code> engine is more suitable in this format.  </p>
  
  <pre><code>dot -Tpng test.dot &gt; test_dot.png
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nAEJI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nAEJI.png" alt="enter image description here"></a></p>
  
  <p>I would like the borders, titles, and clustering (as shown in the example using <code>dot</code> above) but using the <code>neato</code> engine for positioning the nodes.  Is there a way to do this in Graphviz?  </p>
  
  <p>Thanks in advance for the help.  </p>