用graphviz复制图形
我想用graphviz复制我在书上看到的一个特定图形。这是书中的图表: 但使用以下用graphviz复制图形,graphviz,Graphviz,我想用graphviz复制我在书上看到的一个特定图形。这是书中的图表: 但使用以下.dot: digraph rf{ rankdir=LR; graph[size="5,5",ratio=fill, overlap=false]; //node[height="2", width="2", fontsize="50"]; //edge[penwidth="4", fontsize="50"] <a>[color=red]; &l
.dot
:
digraph rf{
rankdir=LR;
graph[size="5,5",ratio=fill, overlap=false];
//node[height="2", width="2", fontsize="50"];
//edge[penwidth="4", fontsize="50"]
<a>[color=red];
<b>[color=red];
<s>[color=purple];
<t>[color=purple];
<s>-><a>[label="500/0"]
<s>-><b>[label="500/0"]
<a>-><b>[label="1/0"]
<a>-><t>[label="500/0"]
<b>-><t>[label="500/0"]
}
希望我能得到一些帮助,谢谢 如果您使用
dot
引擎而不是circo,并且constraint=false
在一条边上,您就在附近
digraph rf{
rankdir=LR;
graph[size="5,5",ratio=fill, overlap=false];
node[height="2", width="2", fontsize="50"];
edge[penwidth="4", fontsize="50"]
<a>[color=red];
<b>[color=red];
<s>[color=purple];
<t>[color=purple];
<s>-><a>[label="500/0"]
<s>-><b>[label="500/0"]
<a>-><b>[label="1/0" constraint=false]
<a>-><t>[label="500/0"]
<b>-><t>[label="500/0"]
}
rf有向图{
rankdir=LR;
图[size=“5,5”,比率=填充,重叠=假];
节点[height=“2”,width=“2”,fontsize=“50”];
边缘[penwidth=“4”,fontsize=“50”]
这很好,但是为什么您决定在该特定边上使用约束呢?如果忽略约束,您会注意到什么区别?
digraph rf{
rankdir=LR;
graph[size="5,5",ratio=fill, overlap=false];
node[height="2", width="2", fontsize="50"];
edge[penwidth="4", fontsize="50"]
<a>[color=red];
<b>[color=red];
<s>[color=purple];
<t>[color=purple];
<s>-><a>[label="500/0"]
<s>-><b>[label="500/0"]
<a>-><b>[label="1/0" constraint=false]
<a>-><t>[label="500/0"]
<b>-><t>[label="500/0"]
}