Loops rendered by graphviz are messy
<p>I am trying to generate an automata with a single state and 4 self-edges. The basic dot code looks like this:</p>

<pre><code>digraph G {
splines=true;
overlap=scalexy;
rankdir="BT";
T[label="0" shape=doublecircle]
T -&gt; T [label="a:a"];
T -&gt; T [label="b:b"]; 
T -&gt; T [label="a:"];
T -&gt; T [label="a:"];
}
</code></pre>

<p>The output is quite messy and trying out parameters like <code>minlen</code> hasn't helped (it doesn't seem to change anything). I also want the edges to be displayed on the top/in the vertical direction, but graphviz displays them on one side. How do I fix this? </p>

<p>Current output:</p>

<p><a href="https://i.stack.imgur.com/sTht8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sTht8.png" alt="enter image description here"></a></p>

<p>I need something like this:</p>

<p><a href="https://i.stack.imgur.com/i7EXn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i7EXn.png" alt="enter image description here"></a></p>

<p>Any help appreciated!</p>