脑袋里有一个模糊的“思维导图”的东东,当然之前没有“思维导图”的概念,最近浏览TL时,偶得一利器Graphviz & DOT language. 恰是吾之所求。下面是WIKI & 官网的简介。

Graphviz:

REXML could not parse this XML/HTML: 
<blockquote><p>AT&T Labs Tools for viewing and interacting with graph diagrams.<br />Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. Automatic graph drawing has many important applications in software engineering, database and web design, networking, and in visual interfaces for many other domains. Graphviz is open source graph visualization software. It has several main graph layout programs.</p></blockquote>

DOT

DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. DOT graphs are typically files that end with the .gv (or .dot) extension. The .gv extension is preferred, as the .dot file extension is used by Microsoft Office 2003.

简而言之,我们用dot语言来表达我们的思想,将流程、关系利用Graphviz“翻译”图形化。Graphviz主要支持两种关系图:

* 有向 * 无向

无向图:

这是DOT最简单的应用。只需用“- -”来表示节点间有关系的。例子如下:

Undirected graph test2 file
1
2
3
4
graph graphName{
	a -- b -- c;
	b -- d;
}

有向图:

同样是DOT简单的应用。只需用“- >”来表示节点间有关系的。例子如下:

Directed graph test2 file
1
2
3
4
digraph graphName{
	a -> b -> c;
	b -> d;
}

修改样式:

在花括号内添加边和节点的定义

1
2
node [shape="record"];
edge [style="dashed"];