2017-05-03 2 views
0

이 내가 DOT 그래프로 생성 할 것입니다 :graphviz를/DOT : "리디렉션"화살표를하는 방법

graph

나는 다음과 같은 코드가 있습니다 또한

\digraph 
[scale=0.7]{g1} 
{ 
    margin="0 0 0 0"; 
    rankdir="TB"; 
"X" [shape=invhouse]; 
" " [shape=house]; 
"100" [shape=cylinder]; 
"X" -> "100" 
"X" -> "+"; 
"100" -> "+" 
"+" -> " "; 
} 

I을 다음 코드는 의미에서 더 가깝지만 시각적으로는 내가 원하는 것처럼 보입니다.

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

, 감사합니다! –