我正在尝试重新订购我的第二层,因此它们按顺序排列。在这里查看我的graphviz点符号 - >
graph G {
node [shape=none,image="switch.png"];
graph [hostidtype="hostname", version="1:0", date="07/09/2014"];
splines=line;
rank=LR;
nodesep=1;
ranksep=1;
"tier2_0":"swp3" -- "tier1_0":"swp3" [
fontsize = 10
tailport=sw headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_0":"swp4" -- "tier1_2":"swp4" [
fontsize = 10
tailport=se headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_1":"swp3" -- "tier1_1":"swp3" [
fontsize = 10
tailport=sw headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_1":"swp4" -- "tier1_3":"swp4" [
fontsize = 10
tailport=se headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_2":"swp4" -- "tier1_0":"swp4" [
fontsize = 10
tailport=sw headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_2":"swp3" -- "tier1_2":"swp3" [
fontsize = 10
tailport=se headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_3":"swp4" -- "tier1_1":"swp4" [
fontsize = 10
tailport=sw headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier2_3":"swp3" -- "tier1_3":"swp3" [
fontsize = 10
tailport=se headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier1_0":"swp1" -- "leaf0":"swp1" [
fontsize = 10
tailport=sw headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier1_1":"swp2" -- "leaf0":"swp2" [
fontsize = 10
tailport=sw headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
"tier1_0":"swp2" -- "leaf1":"swp2" [
fontsize = 10
tailport=se headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
"tier1_1":"swp1" -- "leaf1":"swp1" [
fontsize = 10
tailport=se headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
"tier1_2":"swp1" -- "leaf2":"swp1" [
fontsize = 10
tailport=sw headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp1</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp3</font></td></tr></table>>
];
"tier1_3":"swp2" -- "leaf2":"swp2" [
fontsize = 10
tailport=sw headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
"tier1_2":"swp2" -- "leaf3":"swp2" [
fontsize = 10
tailport=se headport=nw
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
"tier1_3":"swp1" -- "leaf3":"swp1" [
fontsize = 10
tailport=se headport=ne
taillabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
headlabel =<<table border="0" cellborder="0" bgcolor="#a8cc8b"><tr><td align="center"><font color="black" face="arial">swp2</font></td></tr></table>>
];
}
这是输出的样子:http://i.imgur.com/g9j2eJ8.png
请注意第二层和第一层是如何失序的,它喜欢重新订购它,但我认为将它按顺序更有意义......