title: How to set the output size in GraphViz for the dot format?
body: <p>I want to make sure, that all nodes are within some range (say [0,0,W,H]) after layout.</p>
  
  <p>I figured bounding box would be the solution by using the <code>bb</code> attribute, but both <em>dot</em> and <em>neato</em> simply overwrite it.</p>
  
  <p>For example my graph:</p>
  
  <pre><code>strict digraph {
      1,2,3;
      1 -&gt; 3;
      3 -&gt; 2;
  }
  </code></pre>
  
  <p>Output of <code>neato -Gbb="0,0,50,50" -T dot file.txt</code>:</p>
  
  <pre><code>strict digraph {
          graph [bb="0,0,120.49,162.36"];
          node [label="\N"];
          1        [height=0.5,
                  pos="27,18",
                  width=0.75];
          3        [height=0.5,
                  pos="70.233,75.918",
                  width=0.75];
          1 -&gt; 3   [pos="e,57.954,59.469 39.043,34.133 43.004,39.441 47.504,45.468 51.827,51.261"];
          2        [height=0.5,
                  pos="93.485,144.36",
                  width=0.75];
          3 -&gt; 2   [pos="e,87.436,126.56 76.221,93.545 78.643,100.67 81.496,109.07 84.177,116.97"];
  }
  </code></pre>
  
  <p>I get the same positions for any value of <code>bb</code> or any combination of <code>size</code> and <code>dpi</code>.</p>
  
  <p>What I need, is to have all nodes within a given box.</p>
  
  <p>Any suggestions how to do this?</p>
  
  <p><strong>Full story:</strong></p>
  
  <p>I'm using *graphviz_layout* from <em>networkx</em> to layout my graph. I draw the graph with <em>pyprocessing</em>. I want to avoid re-scaling the results from *graphviz_layout*, if there is a way to tell neato my bounds instead.</p>