I have the following simple digraph:
digraph clientproxyserver {
"Client" -> "Proxy" [ label="Request from Client" ];
"Proxy" -> "Server" [ label="Forwarded Request" ];
"Server" -> "Proxy" [ label="Response from Server" ];
"Proxy" -> "Client" [ label="Forwarded Response" ];
}
Running this trough dot
:
dot -Grankdir=LR -Nshape=box -Nheight=1 -Tpng -ocps.png cps.gv
I get the following result:
What can I do to make the two bottom edges straight lines?
That's what usually the option splines=ortho
is for:
digraph clientproxyserver {
rankdir=LR;
node[shape=box, height=1];
splines=ortho
"Client" -> "Proxy" [ label="Request from Client" ];
"Proxy" -> "Server" [ label="Forwarded Request" ];
"Server" -> "Proxy" [ label="Response from Server" ];
"Proxy" -> "Client" [ label="Forwarded Response" ];
}
Unfortunately, the placement of the edges/labels is very confusing:
In my experience, ortho
splines produce rarely a satisfying result.
An other option would be to use splines=polyline
: