title: Graphviz for very large state machine
body: <p>I have a state machine that, despite having very few node (8), has a lot of connections.</p>
  
  <p>How can I draw it using graphviz in a presentable way.</p>
  
  <p>Currently I have this. The problem is that this is not presentable in any way. The arrows have an awkward shape, the states are all over the place...</p>
  
  <pre><code>digraph finite_state_machine {
      rankdir="TB";
      size="8,5"
          {rank = same; 1 2}
  {rank = same; 3 4}
  
  {rank = same; 7 8}
      1-&gt;7[label="&lt;p,a&gt;"];
  1-&gt;5[label="&lt;p,a&gt;"];
  1-&gt;3[label="&lt;p,a&gt;"];
  1-&gt;1[label="&lt;p,a&gt;"];
  2-&gt;7[label="&lt;~(p),a&gt;"];
  2-&gt;5[label="&lt;~(p),a&gt;"];
  2-&gt;3[label="&lt;~(p),a&gt;"];
  2-&gt;1[label="&lt;~(p),a&gt;"];
  3-&gt;7[label="&lt;p,a&gt;"];
  3-&gt;5[label="&lt;p,a&gt;"];
  3-&gt;3[label="&lt;p,a&gt;"];
  3-&gt;1[label="&lt;p,a&gt;"];
  4-&gt;7[label="&lt;~(p),a&gt;"];
  4-&gt;5[label="&lt;~(p),a&gt;"];
  4-&gt;3[label="&lt;~(p),a&gt;"];
  4-&gt;1[label="&lt;~(p),a&gt;"];
  5-&gt;8[label="&lt;p,a&gt;"];
  5-&gt;7[label="&lt;p,a&gt;"];
  5-&gt;6[label="&lt;p,a&gt;"];
  5-&gt;5[label="&lt;p,a&gt;"];
  5-&gt;4[label="&lt;p,a&gt;"];
  5-&gt;2[label="&lt;p,a&gt;"];
  6-&gt;8[label="&lt;~(p),a&gt;"];
  6-&gt;7[label="&lt;~(p),a&gt;"];
  6-&gt;6[label="&lt;~(p),a&gt;"];
  6-&gt;5[label="&lt;~(p),a&gt;"];
  6-&gt;4[label="&lt;~(p),a&gt;"];
  6-&gt;2[label="&lt;~(p),a&gt;"];
  7-&gt;8[label="&lt;p,a&gt;"];
  7-&gt;7[label="&lt;p,a&gt;"];
  7-&gt;6[label="&lt;p,a&gt;"];
  7-&gt;5[label="&lt;p,a&gt;"];
  7-&gt;4[label="&lt;p,a&gt;"];
  7-&gt;2[label="&lt;p,a&gt;"];
  8-&gt;8[label="&lt;~(p),a&gt;"];
  8-&gt;7[label="&lt;~(p),a&gt;"];
  8-&gt;6[label="&lt;~(p),a&gt;"];
  8-&gt;5[label="&lt;~(p),a&gt;"];
  8-&gt;4[label="&lt;~(p),a&gt;"];
  8-&gt;2[label="&lt;~(p),a&gt;"];
  }
  </code></pre>
  
  <p>Which yields this </p>
  
  <p><a href="https://i.stack.imgur.com/4j7dT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4j7dT.png" alt="image generated"></a></p>
  
  <p>Is there any way I can make the automata more presentable?</p>