2017-05-03 11 views
0

"リダイレクト":私もGraphvizの/ DOT:どのように矢印を持っている。これは、私が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" -> "+" 
"+" -> " "; 
} 

:私は、次のコードを持っている

graph

次のようなコードがありますが、意味的には近いが視覚的には私が望むようには見えません。

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; 
     } 
} 

コードを適切に変更するにはどうすればよいですか?どんな助けでも大歓迎です。

答えて

0

group属性は、ノードの行をにするのに役立ちます。華麗です

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; 
    } 
} 

straightened out

+0

、ありがとうございました! –

関連する問題