0
DOT
언어를 사용하여 R
에 다이어그램을 만듭니다. 나는 이상한 결과를 얻었으므로 2 개의 노드 (노드 8과 노드 c4)의 위치를 교환하는 방법에 관심이 있습니까?GraphViz 다이어그램 (DOT)에서 두 노드의 위치를 바꾸기
코드 :
는digraph DAG {
# Initialization of node attributes
node [shape = box, color = blue]; 2; 3; 4;
# Revision to node attributes
{ node [shape = box,style = filled,fillcolor = yellow]; 8}
# Revision to node attributes
{ node [shape = diamond, color = "red"]; c1; c2; c3; c4}
{ rank=same; c1; c2; c3}
{ rank=same; 8; c4}
# Initialization of edge attributes
edge [color = green, rel = yields]
# Edge statements
2->c1 [headport = w];
c1->c2->c3
c2->c1 [tailport = n, headport = n];
8->c3 [tailport = n, headport = s];
c3->3 [tailport = e, headport = n];
c3->c2 [tailport = n, headport = n];
3->c4 [tailport = s, headport = n];
c4->4 [tailport = s, headport = n];
c4->8 [tailport = w, headport = e];
}
(잘못된) 결과는 다음과 같습니다