posted by dalnimbest 2013. 12. 6. 09:19


GraphViz는 AT&T에서 만든 Graph Visualization Software로 오픈소스이고 CPL 라이센스를 따른다. 아래와 같은 형태의 Graph를 만들수 있다.

    


홈페이지는 http://www.graphviz.org/Home.php 이다.


Graph 를 그리기 위해서 DOT 스크립트를 사용한다.


아래는 방향성이 있는 그래프를 그리는 기본 문법 형식이다.

digraph name {

    a -> b->c;

    b->d;

}


그러면 아래와 같은 형태의 Graph가 표시된다.



아래는 방향성이 없는 그래프를 그리는 기본 문법 형식이다. 

graph name {

    a -- b--c;

    b -- d;

}






Graph를 파일형태로 저장하기 위해서는 Output File Type과 Output File Name을 지정해줘야 한다.


아래에서는 PNG 포맷으로 바탕화면 밑에 1.png라는 이름으로 저장했다.





Layout Engine에 따라서 Graph의 모양이 여러가지로 달라진다.


dot - 계층적, 방향성이 있는 그래프를 그릴때 default로 사용한다. 

      - "hierarchical" or layered drawings of directed graphs. This is the default tool to use if edges have directionality.

neato - "spring model''을 그릴때 사용한다. 그릴 그래프가 너무 크지 않을때.(약 100개 정도의 노드)  

          - "spring model' layouts.  This is the default tool to use if the graph is not too large (about 100 nodes) and you don't know anything else about it. Neato attempts to minimize a global energy function, which is equivalent to statistical multi-dimensional scaling.

fdp - neato와 비슷한데 차이점은?

      -  "spring model'' layouts similar to those of neato, but does this by reducing forces rather than working with energy.

sfdp - multiscale version of fdp for the layout of large graphs.

twopi - radial layouts, after Graham Wills 97. Nodes are placed on concentric circles depending their distance from a given root node.

circo - circular layout, after Six and Tollis 99, Kauffman and Wiese 02. This is suitable for certain diagrams of multiple cyclic structures, such as certain telecommunications networks.

'IT > GraphViz' 카테고리의 다른 글

DOT을 이용한 Graph그리기  (0) 2013.12.06
GraphViz의 Node종류  (0) 2013.12.06