首页 > 解决方案 > Graphviz 不在子图周围绘制边框

问题描述

考虑以下 Graphviz 代码:

digraph g1 { 
    compound = true;
    node [shape = box, style=filled, fillcolor=Khaki] a;

    subgraph sg1 {
        node [shape = "", style="", fillcolor=""] b -> c;
        graph [style=solid, penwidth=3];
    }
}

这产生:

在此处输入图像描述

为什么我在子图/集群周围没有边框?

标签: bordergraphvizsubgraph

解决方案


sg1 必须是一个集群才能绘制边框

IE。将其重命名为例如。cluster_sg1


推荐阅读