Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用graphviz复制图形_Graphviz - Fatal编程技术网

用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

我想用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];
    <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"]
}