I have some dot code saved as foo.dot:
digraph finite_state_machine {
rankdir=LR;
size="8,5"
node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
node [shape = circle];
LR_0 -> LR_2 [ label = "SS(B)" ];
LR_0 -> LR_1 [ label = "SS(S)" ];
LR_1 -> LR_3 [ label = "S($end)" ];
LR_2 -> LR_6 [ label = "SS(b)" ];
LR_2 -> LR_5 [ label = "SS(a)" ];
LR_2 -> LR_4 [ label = "S(A)" ];
LR_5 -> LR_7 [ label = "S(b)" ];
LR_5 -> LR_5 [ label = "S(a)" ];
LR_6 -> LR_6 [ label = "S(b)" ];
LR_6 -> LR_5 [ label = "S(a)" ];
LR_7 -> LR_8 [ label = "S(b)" ];
LR_7 -> LR_5 [ label = "S(a)" ];
LR_8 -> LR_6 [ label = "S(b)" ];
LR_8 -> LR_5 [ label = "S(a)" ];
}
When I run the following commands I get the output I expect for PDF and PNG, but SVG shows only part of the diagram:
$ dot -T svg foo.dot -O
$ dot -T pdf foo.dot -O
$ dot -T png foo.dot -O
What might be causing this, and how do I fix it?
$ dot -V
returns 'dot - graphviz version 2.43.0 (0)'; I am using Ubuntu 20.10.
(I have attached a PNG version of the produced SVG; I can't attach SVG.)
As people are not always browsing through the comments.
Tests with:
look all OK.
The problem looks like to be present in the 2.43 version see also https://gitlab.com/graphviz/graphviz/-/issues/1605 as indicated by @twsh).