I have the following dotfile:
digraph finite_state_machine {
pad=0.2;
{
rank=same;
node [shape = doublecircle]; q_3;
node [shape = circle];
q_1 [ label = <<b><i>q<sub>1</sub></i></b>> ];
q_2 [ label = <<b><i>q<sub>2</sub></i></b>> ];
q_3 [ label = <<b><i>q<sub>3</sub></i></b>> ];
q_1 -> q_1 [ label = <<b><i>^a</i></b>> ];
q_1 -> q_2 [ label = <<b><i>a</i></b>> ];
q_2 -> q_2 [ label = <<b><i>^b</i></b>> ];
q_2 -> q_3 [ label = <<b><i>b</i></b>> ];
}
}
And I get the following output:
I want the self loops to be on top of the nodes, and not cross the other edges. And, if possible, more loopy loops. How can I achieve that?
I want it to look something like this:
You may use ports/compass points:
q_1:e -> q_1:w [ label = <<b><i>^a</i></b>> ];
q_2:e -> q_2:w [ label = <<b><i>^b</i></b>> ];
or using nw
/ne
as compass points:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With