title: Graphviz: Changing node spacing within a subgraph cluster
body: <p>Experienced but no expert in Graphviz.</p>
  <p>The example code and image that I am sharing is part of a larger graph, I pulled this out to make the question and example clearer.</p>
  <p>The graph is rank separated and is flowing from left to right. In the image example you see three of the ranks and nodes space nicely but I want to tighten them in the subgraph.</p>
  <p>I have tried a half dozen syntactical options but none of them allow me to shrink the vertical distance between nodes in the subgraph and no where else.</p>
  <p>Not sure how to isolate the nodesep to just the subgraph cluster.</p>
  <p>Thank you for any help.</p>
  <p><img src="https://i.stack.imgur.com/Aiqpj.jpg" alt="Sample subgraph" /></p>
  <pre><code>digraph G {
      
      graph   [rankdir=LR, ranksep=.8, nodesep=.25];
      edge    [dir=forward, color=black];
      node    [shape=rectangle, fontsize=12, fontname=&quot;Times-Roman&quot;, height=.45];
      
      {edge [color=firebrick1]    v_Automobile    -&gt;{&quot;Locational&quot;; &quot;Consumption&quot;; &quot;Governmental&quot;};};
      {edge [color=blue2]         v_Body          -&gt;{&quot;BioMetric&quot;; &quot;Networked IoT&quot;; &quot;Medical&quot;};};
      {edge [color=darkviolet]    v_Citizen       -&gt;{&quot;Associative&quot;; &quot;Conversaional&quot;; &quot;Governmental&quot;; &quot;Political&quot;};};
      {edge [color=lightskyblue]  v_Consumer      -&gt;{&quot;Consumption&quot;; &quot;Educational&quot;; &quot;Employment&quot;; &quot;Governmental&quot;; &quot;Locational&quot;; &quot;Medical&quot;; &quot;Transactional&quot;};};
      {edge [color=crimson]       v_Home          -&gt;{&quot;Consumption&quot;; &quot;Emanative&quot;; &quot;Locational&quot;; &quot;Networked IoT&quot;};};
      
      {edge [color=blue2]         &quot;BioMetric&quot;     -&gt;{SP_Camera; SP_Apps; &quot;CCTV&quot;};};
      {edge [color=crimson]       &quot;Consumption&quot;   -&gt;&quot;Smart Meter&quot;};
      {edge [color=blue2]         &quot;Medical&quot;       -&gt;SP_Apps};
      {edge [color=darkviolet]    &quot;Political&quot;     -&gt;&quot;Ballot&quot;};
      {edge [color=lightskyblue]  &quot;Transactional&quot; -&gt;{SP_Browser; SP_Apps; &quot;Reward Cards&quot;; &quot;Paypoint&quot;};};
      
      subgraph cluster_SmartPhone {label = &quot;Smart Phone&quot;; 
              dirType=none;
              SP_Apps;
              SP_Browser;
              SP_Camera;
              SP_GPS};
              
      SP_Apps             [label=&quot;Apps&quot;,
                          height=.40,
                          color=black];
      SP_Browser          [label=&quot;Browser&quot;,
                          color=black];
      SP_Camera           [label=&quot;Camera&quot;,
                          color=black];
      SP_GPS              [label=&quot;GPS&quot;,
                          color=black];
                          
      v_Automobile        [label=&quot;Automobile&quot;,
                          penwidth=2,
                          color=firebrick1];                  
      v_Body              [label=&quot;Body&quot;,
                          penwidth=2,
                          color=blue2];
      v_Citizen           [label=&quot;Citizen&quot;,
                          penwidth=2,
                          color=darkviolet];
      v_Consumer          [label=&quot;Consumer&quot;,
                          penwidth=2,
                          color=lightskyblue];
      v_Home              [label=&quot;Home&quot;,
                          penwidth=2,
                          color=crimson];
      }
  </code></pre>