﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-welcome-随笔分类-Other</title><link>http://www.cppblog.com/stdyh/category/3709.html</link><description>vc java sdk</description><language>zh-cn</language><lastBuildDate>Wed, 21 May 2008 15:47:27 GMT</lastBuildDate><pubDate>Wed, 21 May 2008 15:47:27 GMT</pubDate><ttl>60</ttl><item><title>可视化graph的工具: GraphViz</title><link>http://www.cppblog.com/stdyh/archive/2007/03/06/19321.html</link><dc:creator>dyh</dc:creator><author>dyh</author><pubDate>Tue, 06 Mar 2007 13:35:00 GMT</pubDate><guid>http://www.cppblog.com/stdyh/archive/2007/03/06/19321.html</guid><wfw:comment>http://www.cppblog.com/stdyh/comments/19321.html</wfw:comment><comments>http://www.cppblog.com/stdyh/archive/2007/03/06/19321.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/stdyh/comments/commentRss/19321.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/stdyh/services/trackbacks/19321.html</trackback:ping><description><![CDATA[
		<h4 class="TextColor1" id="subjcns!3BB36966ED98D3E5!393" style="MARGIN-BOTTOM: 0px">可视化graph的工具: GraphViz</h4>
		<div id="msgcns!3BB36966ED98D3E5!393">
				<div>这套工具可以把有向图(digraph)和无向图(graph)在平面内展现出来，方便观察。GraphViz使用DOT(一种图形描述语言)描述图，然后有解释工具dot生成图像文件。dot支持多种图像文件，包括非矢量的gif、矢量的ps、svg等约20多种格式。DOT语言也非常简单易学。举个例子：<br /><br />digraph G {<br /> size = "4,4"<br /> main [shape=box]; /* this is a comment */<br /> main -&gt; parse [weight=8];<br /> parse -&gt; execute;<br /> main -&gt; init [style=dotted];<br /> main -&gt; cleanup;<br /> execute -&gt; { make_string; printf}<br /> init -&gt; make_string;<br /> edge [color=red]; // so is this<br /> main -&gt; printf [style=bold, label="100 times"];<br /> node [shape=box, style=filled, color=".7.3 1.0"];<br /> execute -&gt; compare;<br />}<br /><br />存为test.dot，然后执行<br />  &gt; dot test.dot -Tpng -o test.png<br />就生成了graph的图像文件。很方便哦。</div>
				<div> </div>
				<div>实际上GraphViz还可以画出很多漂亮的“图”。比如ER图，hash table示意图。更多请参考：<a href="http://www.graphviz.org/Gallery.php"><font color="#956633">http://www.graphviz.org/Gallery.php</font></a>。以后可以考虑用GraphViz画一些示意图，既方便有专业，还很容易转成ps(eps)。继续研究研究。</div>
				<div> </div>
		</div>
		<table cellspacing="0" border="0">
				<tbody>
						<tr height="8">
								<td>
								</td>
						</tr>
						<tr>
								<td valign="top">
										<a href="http://tkfiles.storage.msn.com/x1piYkpqHC_35lu-E3rDrYKj8sE0KNXhelYTR4gjpTZgEk6QwWgpkh0Fe24z-FtOzNU2sxOrOR8J5CG6sLbUDp0kh7ItE5CU55kSJwIsLlpy0BLqEBpf0i4qA" target="_blank">
												<img src="http://tkfiles.storage.msn.com/x1piYkpqHC_35lu-E3rDrYKj8sE0KNXhelYSp4hB2Zb0ifB3JfOod3AyelkYRfZ5DUJKFqhBM2fZmmH-EBkrDbEfZ-12laDxtblfMv0-sii32w" border="0" />
										</a>
								</td>
								<td width="15">
								</td>
								<td valign="top">
										<a href="http://tkfiles.storage.msn.com/x1piYkpqHC_35lu-E3rDrYKj7s4IOzjQKttbac7GfZ8yoEcQ-G0L9CDNIsSrYIWQyUHhcSLj0QgtoszRbMTb7mAE5GOQPLU5GW--XjzhYbEbBbH2dDHSjuXtg" target="_blank">
												<img src="http://tkfiles.storage.msn.com/x1piYkpqHC_35lu-E3rDrYKj7s4IOzjQKttKmT907RtXsxSTAzEgPfOvoDziNMV977PgDFczKJnCoAOtk-SVIjKNv27zIwsLIv28VwiwBwQQiI" border="0" />
										</a>
								</td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.cppblog.com/stdyh/aggbug/19321.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/stdyh/" target="_blank">dyh</a> 2007-03-06 21:35 <a href="http://www.cppblog.com/stdyh/archive/2007/03/06/19321.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>