zoukankan      html  css  js  c++  java
  • [skill][graphviz] 到底用什么画图: graphviz/inkscape/yed

    官方教程文档:http://www.graphviz.org/pdf/dotguide.pdf 

    一:在文档里抄一个简单的例子

    /home/tong/Src/copyright/onescorpion/chimpanzee/doc [git::master *] [tong@T7] [15:36]
    > cat test.gv 
    digraph G {
            subgraph cluster0 {
                    node [style=filled,color=white];
                    style=filled;
                    color=lightgrey;
                    a0 -> a1 -> a2 -> a3;
                    label = "process #1";
            }
            subgraph cluster1 {
                    node [style=filled];
                    b0 -> b1 -> b2 -> b3;
                    label = "process #2";
                    color=blue
            }
            start -> a0;
            start -> b0;
            a1 -> b3;
            b2 -> a3;
            a3 -> a0;
            a3 -> end;
            b3 -> end;
            start [shape=Mdiamond];
            end [shape=Msquare];
    }
    例子

    二:编译并运行

    /home/tong/Src/copyright/onescorpion/chimpanzee/doc [git::master *] [tong@T7] [15:39]
    > dot -T png test.gv -o test.png  
    
    /home/tong/Src/copyright/onescorpion/chimpanzee/doc [git::master *] [tong@T7] [15:39]
    > xv test.png 

    subgraph 横向排列,subgraph中node纵向排列的技巧:

    弄了好久的rank发现好像不行,链接一条不可见的线.如下:

    https://stackoverflow.com/questions/1554635/graphviz-how-to-have-a-subgraph-be-left-to-right-when-main-graph-is-top-to-bot

    ------------------------   update @ 20170811 -------------------------------

    脑图, 流程图,  关系单一的关系图. 哪怕极其庞大, 花起来都很流畅舒服.  但是关系层次复杂了之后, 自动布局就很难表现了.... 比如需要框图,线条,和复杂指向的多重关系.

    于是我找到了另一个工具, 目前刚刚开始使用.

    https://inkscape.org/en/learn/tutorials/

     https://inkscape.org/en/doc/tutorials/basic/tutorial-basic.en.html

    -----------------------  update @ 20170814 ---------------------------------


    inkscape 很专业, 但是更类似与PS. 而不是专注于画图标...

    If you want to work with photographs (raster images), GIMP is your best bet. There are lots of brush and plugin collections floating around the net, too (e.g. see here).
    If you want to create logos, diagrams and illustrations (vector images), use Inkscape.

    于是又有了这个:

    http://www.yworks.com/

    https://www.iconfinder.com/

  • 相关阅读:
    NX二次开发-UFUN设置显示状态抑制显示UF_DISP_set_display
    NX二次开发-使用NXOPEN C++向导模板做二次开发
    ANTV/G6 怎么按条件自定义节点颜色(Graphin)
    js数组去重及数组对象去重
    vue组件老胡机抽奖(转载)
    Kafka第二节
    Kafka第一节
    更改idea的database数据库连接的ddl格式
    不推荐别的了,IDEA 自带的数据库工具就很牛逼!
    MongoDB 按照时间段查询某个物理机的CPU使用率,按照时间倒序排序,取出最新的5条数据
  • 原文地址:https://www.cnblogs.com/hugetong/p/7307172.html
Copyright © 2011-2022 走看看