title: Trying to visualize an abstract syntax tree in graphviz dot, and it's just way too wide. How to fix?
body: <p>So I'm working on a language and I wanted to, mostly out of curiosity, see if I could visualize the abstract syntax tree of a file. After some looking around I found graphviz dot, converted my AST prettyprinter to be able to output to this kind of format:</p>
  
  <pre><code>digraph G {
      main -&gt; parse -&gt; execute;
      main -&gt; init;
      main -&gt; cleanup;
      execute -&gt; make_string;
      execute -&gt; printf
      init -&gt; make_string;
      main -&gt; printf;
      execute -&gt; compare;
  }
  </code></pre>
  
  <p>But my problem is, when I run </p>
  
  <pre><code>dot -Tpng dotf.gv -o graph.png
  </code></pre>
  
  <p>On the input file, I end up with a file that is 8000 pixels in width, which is just not practical. See <a href="http://i.imgur.com/duNmPv0.png" rel="nofollow">here</a>.</p>
  
  <p>I don't know if it's possible to fix, but if someone can I'd be grateful.</p>