为什么pygrapviz(neato)与我的集群重叠?

时间:2019-06-10 14:28:53

标签: dot pygraphviz neato

我正在尝试从以下点文件中绘制图形。当我希望它们按照自上而下的顺序排列时,neato算法将节点重叠,而点一将簇并排放置。

之所以在此添加是因为StackOv说我没有添加足够的detais

graph  {
    graph [mindist=0.5,
        overlap=False,
        ranksep=1
    ];
    node [fontsize=11];
    edge [fontsize=9,
        len=4
    ];
    subgraph cluster_avvc {
        graph [label=AVVC,
            rank="same; 1"
        ];
        avvcsw1      [data="<__main__.N9KSwitch object at 0x02E24490>"];
        avvcsw2      [data="<__main__.N9KSwitch object at 0x02E248D0>"];
    }
    subgraph cluster_spines {
        graph [label=Spines,
            rank="same; 2"
        ];
        sp1      [data="<__main__.N9KSwitch object at 0x02E15D50>"];
        sp2      [data="<__main__.N9KSwitch object at 0x02E156B0>"];
    }
    subgraph cluster_bl {
        graph [label="Border Leafs",
            rank="same; 3"
        ];
        bl1      [data="<__main__.N9KSwitch object at 0x02E15F10>"];
        bl2      [data="<__main__.N9KSwitch object at 0x02E153B0>"];
    }
    avvcsw1 -- sp1 [key=0,
    color=blue,
    headlabel="Eth1/52",
    interfaces="{'sp1': 'Eth1/52', 'avvcsw1': 'Eth2/1'}",
    taillabel="Eth2/1"];
    avvcsw1 -- extLB [key=0,
    color=blue,
    headlabel="E1/2",
    interfaces="{'avvcsw1': 'Eth1/34', 'extLB': 'E1/2'}",
    taillabel="Eth1/34"];
    avvcsw1 -- extLB [key=1,
    color=blue,
    headlabel="E1/1",
    interfaces="{'avvcsw1': 'Eth1/33', 'extLB': 'E1/1'}",
    taillabel="Eth1/33"];
    avvcsw2 -- sp2 [key=0,
    color=blue,
    headlabel="Eth1/36",
    interfaces="{'sp2': 'Eth1/36', 'avvcsw2': 'Eth2/1'}",
    taillabel="Eth2/1"];
    avvcsw2 -- intFW [key=0,
    color=blue,
    headlabel="Gi0/0/1",
    interfaces="{'avvcsw2': 'Eth1/33', 'intFW': 'Gi0/0/1'}",
    taillabel="Eth1/33"];
    avvcsw2 -- intFW [key=1,
    color=blue,
    headlabel="Gi0/0/0",
    interfaces="{'avvcsw2': 'Eth1/34', 'intFW': 'Gi0/0/0'}",
    taillabel="Eth1/34"];
    avvcsw2 -- extFW [key=0,
    color=blue,
    headlabel="Gi0/0/0",
    interfaces="{'avvcsw2': 'Eth1/36', 'extFW': 'Gi0/0/0'}",
    taillabel="Eth1/36"];
    avvcsw2 -- extFW [key=1,
    color=blue,
    headlabel="Gi0/0/1",
    interfaces="{'avvcsw2': 'Eth1/35', 'extFW': 'Gi0/0/1'}",
    taillabel="Eth1/35"];
    avvcsw2 -- fgFW [key=0,
    color=blue,
    headlabel="??",
    interfaces="{'avvcsw2': 'Eth1/32', 'fgFW': '??'}",
    taillabel="Eth1/32"];
    avvcsw2 -- esxSvr [key=0,
    color=blue,
    headlabel=vmnic5,
    interfaces="{'avvcsw2': 'Eth1/31', 'esxSvr': 'vmnic5'}",
    taillabel="Eth1/31"];
    bl1 -- sp1 [key=0,
    color=blue,
    headlabel="Eth1/49",
    interfaces="{'sp1': 'Eth1/49', 'bl1': 'Eth2/1'}",
    taillabel="Eth2/1"];
    bl1 -- sp2 [key=0,
    color=blue,
    headlabel="Eth1/1",
    interfaces="{'sp2': 'Eth1/1', 'bl1': 'Eth2/2'}",
    taillabel="Eth2/2"];
    bl1 -- intLB [key=0,
    color=blue,
    headlabel=1.1,
    interfaces="{'bl1': 'Eth1/32', 'intLB': '1.1'}",
    taillabel="Eth1/32"];
    bl2 -- sp1 [key=0,
    color=blue,
    headlabel="Eth1/50",
    interfaces="{'sp1': 'Eth1/50', 'bl2': 'Eth2/1'}",
    taillabel="Eth2/1"];
    bl2 -- sp2 [key=0,
    color=blue,
    headlabel="Eth1/1",
    interfaces="{'sp2': 'Eth1/1', 'bl2': 'Eth2/2'}",
    taillabel="Eth2/2"];
    bl2 -- esxSvr [key=0,
    color=blue,
    headlabel=vmnic2,
    interfaces="{'bl2': 'Eth1/28', 'esxSvr': 'vmnic2'}",
    taillabel="Eth1/28"];
    bl2 -- intLB [key=0,
    color=blue,
    headlabel=1.2,
    interfaces="{'bl2': 'Eth1/32', 'intLB': '1.2'}",
    taillabel="Eth1/32"];
}

编辑:我使用完整的配置更新了点文件,因此您可以自己尝试

enter image description here enter image description here

0 个答案:

没有答案
相关问题