Differences between revisions 2 and 3
Revision 2 as of 2006-02-13 11:24:56
Size: 1781
Editor: ZoomQuiet
Comment:
Revision 3 as of 2006-02-13 11:25:55
Size: 1885
Editor: ZoomQuiet
Comment:
Deletions are marked like this. Additions are marked like this.
Line 37: Line 37:
即可输出中文在图片中! 即可输出中文在图片中! 注意先后安装顺序! TureType 字体的使用需要一些库的支持,graphviz有自动安装的

中文输出

  • 可恨不支持中文!
    • 支持中文的,不过要在dot文件中输入utf-8编码的汉字,生成图片时也要指定字体名称。比如:
      dot -Nfontname=simsun -Tpng sample.dot -o sample.png
  • 提供C的源代码,可是…………想起C就烦!

sample.dot

{{{/*sample.dot*/ digraph G { PY->ZO->Zope2->CMF->Plone; ZO->Zope3; ZO->Zs;

  • Zs[label="ZODB,ZPT(等)\n...."];

PY->XML; PY->"4Suite"->XML;PY->Elements->XML; PY[label="Python语言",shape=box]; ZO[label="Zope",shape=egg]; } }}}

  • attachment:sample.png

FreeBSD 中

不同与Linux中,中文支持只需字体!其它的 graphviz 自身安装好了!

# cd /usr/ports/
(FreeBSD6.0以后使用portsnap 快捷升级产品树)
# portsnap update
# cd /usr/ports/graphics/graphviz
# make install clean
(然后安装字体)
# cd /usr/ports/chinese/fireflyttf
# make install clean
# cd /usr/ports/chinese/arphicttf
# make install clean

即可输出中文在图片中! 注意先后安装顺序! TureType 字体的使用需要一些库的支持,graphviz有自动安装的

自动工具

GraphVizDeepinto (last edited 2010-04-08 04:02:05 by ZoomQuiet)