Differences between revisions 3 and 9 (spanning 6 versions)
Revision 3 as of 2004-09-03 02:23:17
Size: 3985
Editor: limodou
Comment:
Revision 9 as of 2006-02-14 13:17:11
Size: 3504
Editor: ZoomQuiet
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
''GraphViz 是AT&T 贡献的跨平台图形生成工具!通过 The DOT Language 一种脚本语言来定义图元的关系进行自动绘制'' ||http://www.graphviz.org/gvicons/doc-about.png||'''[http://www.graphviz.org/About.php GraphViz] 是AT&T 贡献的跨平台图形生成工具!'''[[BR]]通过 The DOT Language 一种脚本语言来定义图元的关系进行自动绘制''||
Line 38: Line 38:
 * attachment:sample.png attachment:sample.png
Line 55: Line 56:
 * attachment:sample0.png
attachment:sample0.png
Line 58: Line 61:
=== 进一步学习 ===  === 进一步学习 ===
Line 76: Line 79:
Line 77: Line 81:
 * 可恨不支持中文!
 * 提供C的源代码,可是…………想起C就烦!
 * 不过 ["limodou"] 在["Meteor"]中提供了一个想法[http://wiki.woodpecker.org.cn/moin.cgi/Otter_e6_a8_a1_e6_9d_bf_e6_b5_8b_e8_af_95_e8_ae_b0_e5_bd_95#head-c8bdadd9bf5177726cce95e7ee525cbdb0ac6e9c 模板关系图]
   * 哈哈哈!可以让Python 自动的分析代码生成 dot 脚本通过 GraphViz 工具生产结构示意图!
   * ["dotScript"] -- dot化脚本结构!
     * 理解脚本函式调用情况;
     * 理解脚本类引用,继承情况;
     * 理解不同语言脚本的情况;
[[Include(GraphVizDeepinto)]]
Line 92: Line 89:

所想即所得 才是真正的快乐! -- Zoom.Quiet [DateTime(2004-09-03T02:05:16Z)] TableOfContents

一句话介绍

http://www.graphviz.org/gvicons/doc-about.png||'''[http://www.graphviz.org/About.php GraphViz] 是AT&T 贡献的跨平台图形生成工具!BR通过 The DOT Language 一种脚本语言来定义图元的关系进行自动绘制

快速开始

安装

  • 不用说了!几乎是绿色软件了!
  • M$平台中解压缩就好,
    • 而且自动加了系统路径

使用

  • 嗯嗯!最愉快的经历!运行快!语法简练!听话!
  • 关键是脚本语言的行为哪!你可以随时输出图形结果来预览成果!

编写dot脚本

  • 没有什么可说的,帮助文件比较玄!syntax 好复杂的样子!
    • 但是看例子实在就简单了!

   1 /*sample.dot*/
   2 digraph G {
   3 PY->ZO->Zope2->CMF->Plone;
   4 ZO->Zope3;
   5 ZO->Zs;
   6     Zs[label="ZODB,ZPT\n...."];
   7 PY->XML;
   8 PY->"4Suite"->XML;PY->Elements->XML;
   9 PY[label="Python",shape=box];
  10 ZO[label="Zope",shape=egg];
  11 }    

运行绘制

  • 以上脚本使用最基本的命令输出:
        dot -Tpng sample.dot -o sample.png    

attachment:sample.png

attachment:sample0.png

  • 而各种命令行参数是与脚本的属性声明是共通的,不过是全局性的定义…………

进一步学习

  • 哇呀呀!直接支持HTML的表格定义语法!看来HTML的影响力很NB哪!
       1  digraph table {
       2     node [shape=plaintext];    
       3     struct1 [label=<<TABLE BORDER="1">
       4         <TR>
       5             <TD >a</TD>
       6             <TD BGCOLOR="yellow">b</TD>
       7             <TD HEIGHT="40" WIDTH="90" ALIGN="right">c</TD>
       8             <TD VALIGN="bottom">d</TD>
       9         </TR>
      10     </TABLE>>];
      11 }
    
  • 将输出为
  • attachment:tab.png

深入

Include(GraphVizDeepinto)

讨论

有更加美好的体验的话请一定分享!

GraphViz (last edited 2010-04-08 03:58:58 by ZoomQuiet)