使用Graphviz和Dot的两个簇的对齐问题

使用Graphviz和Dot的两个簇的对齐问题,graphviz,dot,rank,Graphviz,Dot,Rank,我试图让下面的点文件输出两个子图。我希望cluster0中的bLoop节点与cluster 2中的ISR结构对齐。我现在正在使用一个不可见的节点来实现这一点,但却意外地在cluster0中留下了大量灰色空间 有没有一种方法可以在没有不可见节点的情况下实现我想要的功能? 我还不能发布图片,所以这里是最新的 有向图G{ ranksep=.75; nodesep=1.5; 节点[形状=无] 节点[fontsize=16,fixedsize=false,宽度=0.7,形状=矩形]; 边[fontsize

我试图让下面的点文件输出两个子图。我希望cluster0中的bLoop节点与cluster 2中的ISR结构对齐。我现在正在使用一个不可见的节点来实现这一点,但却意外地在cluster0中留下了大量灰色空间

有没有一种方法可以在没有不可见节点的情况下实现我想要的功能? 我还不能发布图片,所以这里是最新的

有向图G{
ranksep=.75;
nodesep=1.5;
节点[形状=无]
节点[fontsize=16,fixedsize=false,宽度=0.7,形状=矩形];
边[fontsize=16];
比率=填充;
样条线=假;
复合=真;
子图簇0{
节点[样式=填充];
样式=填充;
颜色=浅灰色;
label=“设置和背景循环”;
a0[标签=“外围设备配置”];
a1[label=“Solar Library Block Configs”];
a2[label=“启用中断”];
bgLoop[label=“启动后台循环”];
e0[形状=矩形,样式=Invi,固定大小=真,宽度=0.01];
a0->a1->a2->BG循环;
bgLoop->e0[样式=invi]
}
子图簇1{
节点[style=filled,shape=“doublecircle”];
开始
style=“invi”
}
子图簇2{
节点[形状=记录,颜色=白色];
样式=填充;
颜色=浅灰色;
label=“ISRs”;
struct1[shape=record,color=white,label=“{Slow-ISR | Fast-ISR}”;
}
专注=真实;
struct1->bgLoop[lhead=cluster0,ltail=cluster4,constraint=true];
bgLoop->struct1[lhead=cluster4,ltail=cluster0,constraint=true];
struct1->e0[style=invis,constraint=true];
开始->a0[lhead=cluster0];
}

您需要帮助器节点来获得struct1的正确列组

digraph G {
    ranksep=.75;
    nodesep = 1.5;
    node[fontsize=16,fixedsize=false,width=0.7,shape=rectangle];
    edge[fontsize=16];
    compound=true
        subgraph cluster2 { rank="max"
            node [shape=record,color=white];
            style=filled;
            color=lightgrey;
            label = "ISRs";
            struct1 [shape = record, color=white, label="{<f1> Slow ISR | <f2> Fast ISR }"]; 
        }

        subgraph cluster0 {
            node [style=filled];
            style=filled;
            color=lightgrey;
            label = "Setup and Background Loop";

            a0[label = "Peripheral Configs"];
            a1[label = "Solar Library Block Configs"];
            a2[label = "Enable Interrupts"];
            bgLoop[label = "Start Background Loop"];

            a0 -> a1 -> a2 -> bgLoop;

        }

        subgraph cluster1 {
                node [style=filled, shape = "doublecircle"];
                start
                style="invis"
            }


    {node [style=invis]; 0; 1; 2; 3; }
    {edge [style=invis]; 0->1->2->3->struct1; }

    struct1 -> bgLoop[lhead=cluster0, ltail=cluster2, constraint=false];
    bgLoop -> struct1[lhead=cluster2, ltail=cluster0, constraint=false];
    start -> a0[lhead=cluster0];
}
有向图G{
ranksep=.75;
nodesep=1.5;
节点[fontsize=16,fixedsize=false,宽度=0.7,形状=矩形];
边[fontsize=16];
复合=真
子图cluster2{rank=“max”
节点[形状=记录,颜色=白色];
样式=填充;
颜色=浅灰色;
label=“ISRs”;
struct1[shape=record,color=white,label=“{Slow-ISR | Fast-ISR}”;
}
子图簇0{
节点[样式=填充];
样式=填充;
颜色=浅灰色;
label=“设置和背景循环”;
a0[标签=“外围设备配置”];
a1[label=“Solar Library Block Configs”];
a2[label=“启用中断”];
bgLoop[label=“启动后台循环”];
a0->a1->a2->BG循环;
}
子图簇1{
节点[style=filled,shape=“doublecircle”];
开始
style=“invi”
}
{node[style=invi];0;1;2;3;}
{edge[style=invi];0->1->2->3->struct1;}
struct1->bgLoop[lhead=cluster0,ltail=cluster2,constraint=false];
bgLoop->struct1[lhead=cluster2,ltail=cluster0,constraint=false];
开始->a0[lhead=cluster0];
}

digraph G {
    ranksep=.75;
    nodesep = 1.5;
    node[fontsize=16,fixedsize=false,width=0.7,shape=rectangle];
    edge[fontsize=16];
    compound=true
        subgraph cluster2 { rank="max"
            node [shape=record,color=white];
            style=filled;
            color=lightgrey;
            label = "ISRs";
            struct1 [shape = record, color=white, label="{<f1> Slow ISR | <f2> Fast ISR }"]; 
        }

        subgraph cluster0 {
            node [style=filled];
            style=filled;
            color=lightgrey;
            label = "Setup and Background Loop";

            a0[label = "Peripheral Configs"];
            a1[label = "Solar Library Block Configs"];
            a2[label = "Enable Interrupts"];
            bgLoop[label = "Start Background Loop"];

            a0 -> a1 -> a2 -> bgLoop;

        }

        subgraph cluster1 {
                node [style=filled, shape = "doublecircle"];
                start
                style="invis"
            }


    {node [style=invis]; 0; 1; 2; 3; }
    {edge [style=invis]; 0->1->2->3->struct1; }

    struct1 -> bgLoop[lhead=cluster0, ltail=cluster2, constraint=false];
    bgLoop -> struct1[lhead=cluster2, ltail=cluster0, constraint=false];
    start -> a0[lhead=cluster0];
}