如何画出高端大气漂亮的图

来源:互联网 发布:软件测试流程是什么 编辑:程序博客网 时间:2024/04/28 16:22

在此,向大家推荐一款非常好用的作图软件,不用人工交互费劲调整格式和布局,用简单易懂的脚本语言就能画出非常漂亮的图,这款软件的名字是graphviz,软件挺小的,界面简单但是功能很强大。

graphvit下载地址:http://www.onlinedown.net/soft/522290.htm

下载安装完之后,在开始菜单里找到gvedit.exe文件所在的路径,将该应用程序复制到桌面上方面使用。

双击gvedit.exe,运行该程序,界面如下:


File->New,新建一个脚本文件:

示例1,添加如下代码:

digraph summary{    start [label="Start with a Node"]    next [label="Choose your shape", shape=box]    warning [label="Don't go overboard", color=Blue, fontcolor=Red,fontsize=24,style=filled, fillcolor=green,shape=octagon]    end [label="Draw your graph!", shape=box, style=filled, fillcolor=yellow]    start->next    start->warning     next->end [label="Getting Better...", fontcolor=darkblue]}
点击的红色方框,运行该dot脚本语言,结果图如下:


示例2,再新建一个脚本文件,添加如下代码:

digraph automata_0 {  size = "8.5, 11";  fontname = "Microsoft YaHei";  fontsize = 10;    node [shape = circle, fontname = "Microsoft YaHei", fontsize = 10];  edge [fontname = "Microsoft YaHei", fontsize = 10];    0 [ style = filled, color=lightgrey ];  2 [ shape = doublecircle ];    0 -> 2 [ label = "a " ];  0 -> 1 [ label = "other " ];  1 -> 2 [ label = "a " ];  1 -> 1 [ label = "other " ];  2 -> 2 [ label = "a " ];  2 -> 1 [ label = "other " ];    "Machine: a" [ shape = plaintext ];}
运行脚本结果图如下:




原创粉丝点击