【发布时间】:2015-05-17 02:42:40
【问题描述】:
我正在尝试绘制一个图表,该图表将枚举所有可能项集的列表。它应该是这样的:
但我目前得到这个:
我尝试使用 DOT 语言,但结果与布局不同。我的点代码是
digraph item_set {
// the first layer
A [label = "abcd=>{}"];
// the second layer
B1 [label = "bcd=>a"];
B2 [label = "acd=>b"];
B3 [label = "abd=>c"];
B4 [label = "abc=>d"];
// the third layer
C1 [label = "cd=>ab"];
C2 [label = "bd=>ac"];
C3 [label = "bc=>ad"];
C4 [label = "ad=>bc"];
C5 [label = "ac=>bd"];
C6 [label = "ab=>cd"];
// the forth layer
D1 [label = "d=>abc"];
D2 [label = "c=>abd"];
D3 [label = "b=>acd"];
D4 [label = "a=>bcd"];
// draw line between the first layer and the second layer
A -> {B1, B2, B3, B4} [dir = none];
// draw line between the second layer and the third layer
{B1, B2} -> C1 [dir = none];
{B1, B3} -> C2 [dir = none];
{B1, B4} -> C3 [dir = none];
{B2, B3} -> C4 [dir = none];
{B2, B4} -> C5 [dir = none];
{B3, B4} -> C6 [dir = none];
// draw line between the second layer and the third layer
{C1, C2, C4} -> D1 [dir = none];
{C1, C3, C5} -> D2 [dir = none];
{C2, C3, C6} -> D3 [dir = none];
{C4, C5, C6} -> D4 [dir = none]; }
【问题讨论】:
-
非常感谢您帮我编辑问题。