title: graphviz output svg
body: <p>I use graphviz to get the svg back</p>
  
  <pre><code>dot -Tsvg graph.dot -o file
  </code></pre>
  
  <ol>
  <li>How to set the Graphviz output svg to "rect" node not "polygon"</li>
  <li>and the translate is set to (0,0) not (4 256)</li>
  </ol>
  
  <p>thanks a lot</p>
  
  <pre><code>&lt;g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 256)"&gt;
  &lt;polygon fill="white" stroke="white" points="-4,5 -4,-256 265,-256 265,5 -4,5"/&gt;
  
  digraph G {
          a1 [id=a1 shape=rectangle];
          a2 [id=a2 shape=rectangle];
          a3 [id=a3 shape=rectangle];
          a4 [id=a4 shape=rectangle];
          a5 [id=a5 shape=rectangle];
          a1 -&gt; a5;
          a2 -&gt; a1;
          a2 -&gt; a5;
          a3 -&gt; a2;
          a4 -&gt; a2;
          a4 -&gt; a4;
  }
  
  
  &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;!-- Generated by graphviz version 2.26.0 (20091210.2329)
   --&gt;
  &lt;!-- Title: G Pages: 1 --&gt;
  &lt;svg width="152pt" height="260pt"
   viewBox="0.00 0.00 152.00 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
  &lt;g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 256)"&gt;
  &lt;title&gt;G&lt;/title&gt;
  &lt;polygon fill="white" stroke="white" points="-4,5 -4,-256 149,-256 149,5 -4,5"/&gt;
  &lt;!-- a1 --&gt;
  &lt;g id="a1" class="node"&gt;&lt;title&gt;a1&lt;/title&gt;
  &lt;polygon fill="none" stroke="black" points="63,-108 9,-108 9,-72 63,-72 63,-108"/&gt;
  &lt;text text-anchor="middle" x="36" y="-86.4" font-family="Times Roman,serif" font-size="14.00"&gt;a1&lt;/text&gt;
  &lt;/g&gt;
  &lt;!-- a5 --&gt;
  &lt;g id="a5" class="node"&gt;&lt;title&gt;a5&lt;/title&gt;
  &lt;polygon fill="none" stroke="black" points="90,-36 36,-36 36,-1.77636e-14 90,-3.55271e-15 90,-36"/&gt;
  &lt;text text-anchor="middle" x="63" y="-14.4" font-family="Times Roman,serif" font-size="14.00"&gt;a5&lt;/text&gt;
  &lt;/g&gt;
  &lt;!-- a1&amp;#45;&amp;gt;a5 --&gt;
  &lt;g id="edge2" class="edge"&gt;&lt;title&gt;a1&amp;#45;&amp;gt;a5&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M42.8132,-71.8314C45.7644,-63.9617 49.2858,-54.5712 52.555,-45.8533"/&gt;
  &lt;polygon fill="black" stroke="black" points="55.8609,-47.0055 56.095,-36.4133 49.3066,-44.5476 55.8609,-47.0055"/&gt;
  &lt;/g&gt;
  &lt;!-- a2 --&gt;
  &lt;g id="a2" class="node"&gt;&lt;title&gt;a2&lt;/title&gt;
  &lt;polygon fill="none" stroke="black" points="90,-180 36,-180 36,-144 90,-144 90,-180"/&gt;
  &lt;text text-anchor="middle" x="63" y="-158.4" font-family="Times Roman,serif" font-size="14.00"&gt;a2&lt;/text&gt;
  &lt;/g&gt;
  &lt;!-- a2&amp;#45;&amp;gt;a1 --&gt;
  &lt;g id="edge4" class="edge"&gt;&lt;title&gt;a2&amp;#45;&amp;gt;a1&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M56.1868,-143.831C53.2356,-135.962 49.7142,-126.571 46.445,-117.853"/&gt;
  &lt;polygon fill="black" stroke="black" points="49.6934,-116.548 42.905,-108.413 43.1391,-119.006 49.6934,-116.548"/&gt;
  &lt;/g&gt;
  &lt;!-- a2&amp;#45;&amp;gt;a5 --&gt;
  &lt;g id="edge6" class="edge"&gt;&lt;title&gt;a2&amp;#45;&amp;gt;a5&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M66.8413,-143.6C68.8166,-133.203 71.0123,-119.935 72,-108 73.3197,-92.0545 73.3197,-87.9455 72,-72 71.3055,-63.6085 70.0138,-54.5578 68.6214,-46.3092"/&gt;
  &lt;polygon fill="black" stroke="black" points="72.0544,-45.6235 66.8413,-36.3999 65.1647,-46.8612 72.0544,-45.6235"/&gt;
  &lt;/g&gt;
  &lt;!-- a3 --&gt;
  &lt;g id="a3" class="node"&gt;&lt;title&gt;a3&lt;/title&gt;
  &lt;polygon fill="none" stroke="black" points="54,-252 2.4869e-14,-252 0,-216 54,-216 54,-252"/&gt;
  &lt;text text-anchor="middle" x="27" y="-230.4" font-family="Times Roman,serif" font-size="14.00"&gt;a3&lt;/text&gt;
  &lt;/g&gt;
  &lt;!-- a3&amp;#45;&amp;gt;a2 --&gt;
  &lt;g id="edge8" class="edge"&gt;&lt;title&gt;a3&amp;#45;&amp;gt;a2&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M36.0843,-215.831C40.0615,-207.877 44.8155,-198.369 49.2139,-189.572"/&gt;
  &lt;polygon fill="black" stroke="black" points="52.4517,-190.923 53.7934,-180.413 46.1907,-187.792 52.4517,-190.923"/&gt;
  &lt;/g&gt;
  &lt;!-- a4 --&gt;
  &lt;g id="a4" class="node"&gt;&lt;title&gt;a4&lt;/title&gt;
  &lt;polygon fill="none" stroke="black" points="126,-252 72,-252 72,-216 126,-216 126,-252"/&gt;
  &lt;text text-anchor="middle" x="99" y="-230.4" font-family="Times Roman,serif" font-size="14.00"&gt;a4&lt;/text&gt;
  &lt;/g&gt;
  &lt;!-- a4&amp;#45;&amp;gt;a2 --&gt;
  &lt;g id="edge10" class="edge"&gt;&lt;title&gt;a4&amp;#45;&amp;gt;a2&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M89.9157,-215.831C85.9385,-207.877 81.1845,-198.369 76.7861,-189.572"/&gt;
  &lt;polygon fill="black" stroke="black" points="79.8093,-187.792 72.2066,-180.413 73.5483,-190.923 79.8093,-187.792"/&gt;
  &lt;/g&gt;
  &lt;!-- a4&amp;#45;&amp;gt;a4 --&gt;
  &lt;g id="edge12" class="edge"&gt;&lt;title&gt;a4&amp;#45;&amp;gt;a4&lt;/title&gt;
  &lt;path fill="none" stroke="black" d="M126.241,-247.487C136.024,-247.777 144,-243.281 144,-234 144,-228.199 140.884,-224.268 136.159,-222.206"/&gt;
  &lt;polygon fill="black" stroke="black" points="136.687,-218.745 126.241,-220.513 135.509,-225.646 136.687,-218.745"/&gt;
  &lt;/g&gt;
  &lt;/g&gt;
  &lt;/svg&gt;
  </code></pre>