微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Graphviz -- splines = "curved" 不起作用

如何解决Graphviz -- splines = "curved" 不起作用

我正在尝试使用 .pdf文件.dot 中编译有限状态机 (FSM) 视觉表示:

// Use directional graph "digraph" opossed to "graph"
digraph {

    rankdir = TB;
    nodesep = 0.5;
    ranksep = 0.25;
    //splines = "curved";
    //splines = "ortho";
    
    // A:
    node[
        fontname = "IBM Plex Mono Text Italic",fontsize = 8,shape = circle,style = "filled",fillcolor = "#ddddDD",fontcolor = "#333333",color = "#AAAAAA",penwidth = 0.1;
    ]

    // B:
    edge[
        fontname = "IBM Plex Mono Bold",//style = "dotted",arrowhead = normal,arrowsize = 0.4,penwidth = 0.1;
        fontcolor = "#444444",color = "#777777",]

    // C:
    graph[
        fontname = "IBM Plex Mono Bold",fontsize=8,rank = TB,fontcolor = "#444444",color = "#EEEEEE",]
    
    // C:
    000[label = "start",shape = "plain",fillcolor = "none"];
    001[label = "q1",shape = "doublecircle"];
    002[label = "q2"];
    003[label = "q3"];

    // D:
    000->001;
    001->001[label="2"];
    001->002[label="1"];
    002->001[label="0"];
    002->002[label="2"];
    002->003[label="1"];
    003->002[label="0"];
    003->003[label="2"];
    001->003[label="1"];
    003->001[label="0"];

}

这几乎完美编译(除了直线内部转换)

enter image description here

如果我取消注释顶部的 splines = "ortho"; 行,它会像这样编译(它很丑,但我想表明它有效)

enter image description here

但是当我取消注释顶部的行 splines = "curved"; (这是我需要的那个) 时,灾难发生了:

enter image description here

为什么会发生这种情况?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。