Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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_Dot - Fatal编程技术网

Graphviz 如何引导点使用较短的边路径?

Graphviz 如何引导点使用较短的边路径?,graphviz,dot,Graphviz,Dot,下图的布局几乎完美无瑕,除了从左侧“命名管道”节点到“cat”节点的边缘,该节点采用了一条长而迂回的路线,而不是我在下图中用红色标记的明显的短路线。有没有一种方法可以直接点使用短边路径?请注意,图底部的序列图必须按当前显示的顺序呈现,即按从左到右的顺序呈现 这是绘制图表的代码 digraph D { fontname="Arial"; subgraph cluster_async { label="Asynchronous processes"; style=filled;

下图的布局几乎完美无瑕,除了从左侧“命名管道”节点到“cat”节点的边缘,该节点采用了一条长而迂回的路线,而不是我在下图中用红色标记的明显的短路线。有没有一种方法可以直接点使用短边路径?请注意,图底部的序列图必须按当前显示的顺序呈现,即按从左到右的顺序呈现

这是绘制图表的代码

digraph D {
fontname="Arial";
subgraph cluster_async {
    label="Asynchronous processes";
    style=filled;
    color=lightgrey;

    node [shape=box, style=solid, fillcolor=white, fontname="Arial"];
    {
        rank=same;
        npi_0_0_0 [label="named\npipe"];
        npi_0_3_0 [label="named\npipe"];
        npi_0_2_0 [label="named\npipe"];

    }

    node [shape=box, style=bold];
    tee [label="sgsh-tee"];
    "ls -l" -> tee;
    tee -> npi_0_0_0;
    tee -> npi_0_3_0;
    tee -> npi_0_2_0;

    NBYTES [label="sgsh-writeval -s NBYTES"];
    npi_0_3_0 -> "awk '{s += $5} END {print s}'" -> NBYTES;

    NDIRS [label="sgsh-writeval -s NDIRS"];
    npi_0_2_0  -> "grep -c '^d'" -> NDIRS;

    // Put some order in the appearance
    {
        rank=same;
        NDIRS;
        NBYTES;
    }
}

subgraph clustersync {
    label="Synchronous sequence";
    style=dashed;
    start [shape=circle, style=filled, label="", fillcolor=black, width=.2];
    node [shape=box, style=bold, fontname="Arial"];
    npi_0_0_0:sw -> cat:nw [constraint=false];
    "sgsh-readval -s NDIRS" -> echo;
    "sgsh-readval -s NBYTES" -> echo;

    NBYTES -> "sgsh-readval -s NBYTES";
    NDIRS -> "sgsh-readval -s NDIRS";

    end [shape=doublecircle, style=filled, label="", fillcolor=black, width=.2];
    {
        rank=same;
        edge [arrowhead=open];
        start -> cat -> echo -> end;
    }
}
}
(如果您感兴趣,此图说明了示例的设置。)

对于此图,设置将产生理想的结果。

若你们不介意的话,它在水平方向上看起来更好,而且有一个肮脏的边缘。检查效果。谢谢!样条线=正交选项(我不知道)似乎是一个非常方便的样式选择。