我有以下简单的有向图:
digraph clientproxyserver {
"Client" -> "Proxy" [ label="Request from Client" ];
"Proxy" -> "Server" [ label="Forwarded Request" ];
"Server" -> "Proxy" [ label="Response from Server" ];
"Proxy" -> "Client" [ label="Forwarded Response" ];
}
运行此低谷dot
:
dot -Grankdir=LR -Nshape=box -Nheight=1 -Tpng -ocps.png cps.gv
我得到以下结果:
如何使两条底边成直线?
答案 0 :(得分:1)
通常,选项splines=ortho
用于以下目的:
myEditor.getData();
不幸的是,边缘/标签的位置非常混乱:
根据我的经验,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" ];
}
样条曲线很少会产生令人满意的结果。
另一种选择是使用ortho
: