Graphviz/DOT:如何使用箭头;“重定向”;

Graphviz/DOT:如何使用箭头;“重定向”;,graphviz,dot,Graphviz,Dot,这就是我想要在点图中生成的内容: 我有以下代码: \digraph [scale=0.7]{g1} { margin="0 0 0 0"; rankdir="TB"; "X" [shape=invhouse]; " " [shape=house]; "100" [shape=cylinder]; "X" -> "100" "X" -> "+"; "100" -> "+" "+" -> " "; } 我还有下面的代码,从某种意义上讲更接近,但在视觉上与我想要

这就是我想要在点图中生成的内容:

我有以下代码:

\digraph
[scale=0.7]{g1}
{
   margin="0 0 0 0";
   rankdir="TB";
"X" [shape=invhouse];
" " [shape=house];
"100" [shape=cylinder];
"X" -> "100"
"X" -> "+";
"100" -> "+"
"+" -> " ";
}
我还有下面的代码,从某种意义上讲更接近,但在视觉上与我想要的完全不同:

digraph {
        node[ shape = plaintext ];
        a [label="X", shape = invhouse]
        b [label="+", shape = ellipse]
        ab1 [label="dummy", style=invis, shape=point]
        ab2 [label="dummy", style=invis, shape=point]
        c [label="100", shape = cylinder]
        d [label=" ", shape=house]
        subgraph cluster_0 {
        style=invis
                a -> ab1 [arrowhead=none];
                ab1 -> c;
                c -> ab2;
                ab1 -> ab2 [arrowhead=none];
                ab2 -> b;
                b -> d;
        }
}

如何适当地更改代码?任何帮助都将不胜感激。

组属性有助于使节点对齐

digraph {
    node[ shape = plaintext group=abd];
    a [label="X", shape = invhouse]
    b [label="+", shape = ellipse]
    ab1 [label="dummy", style=invis, shape=point]
    ab2 [label="dummy", style=invis, shape=point]
    c [label="100", shape = cylinder, group=c]
    d [label=" ", shape=house]
    subgraph cluster_0 {
    style=invis
            a -> ab1 [arrowhead=none];
            ab1 -> c;
            c -> ab2;
            ab1 -> ab2 [arrowhead=none];
            ab2 -> b;
            b -> d;
    }
}