zoukankan      html  css  js  c++  java
  • Graphviz

    Graphviz 是一款由 AT&T Research 和 Lucent Bell 实验室开源的可视化图形工具,可以很方便的用来绘制结构化的图形网络,支持多种格式输出

    使用dot作为脚本语言

    官网 https://www.graphviz.org/

    下载 https://www.graphviz.org/download/

    安装graphviz并设置环境变量,eg:D:Program FilesGraphviz 2.44.1in

    检查是否安装成功

    eg:

    first.dot

    digraph first2{
    a;
    b;
    c;
    d;
    a->b;
    b->d;
    c->d;
    }

    运行

    dot -Tpng first.dot -o first.png

     添加顶点和边的新定义

    digraph first2{
    node [shape="record"];
    edge [style="dashed"];
    a;
    b;
    c;
    d;
    a->b;
    b->d;
    c->d;
    }

    digraph g {
      node[peripheries=2, style=filled, color="#eecc80"];
      a->b [color=red, style=dashed]; 
      b->c;
      b->d [arrowhead=box];
      b->e [dir=none];
      d->f [dir=both];
      f->h [label=go];
      f->k [arrowhead=diamond];
    }

    digraph g {
      node [shape = record,height=.1];
      node0[label = "<f0> |<f1> G|<f2> "];
      node1[label = "<f0> |<f1> E|<f2> "];
      node2[label = "<f0> |<f1> B|<f2> "];
      node3[label = "<f0> |<f1> F|<f2> "];
      node4[label = "<f0> |<f1> R|<f2> "];
      node5[label = "<f0> |<f1> H|<f2> "];
      node6[label = "<f0> |<f1> Y|<f2> "];
      node7[label = "<f0> |<f1> A|<f2> "];
      node8[label = "<f0> |<f1> C|<f2> "];
      "node0":f2 -> "node4":f1;
      "node0":f0 -> "node1":f1;
      "node1":f0 -> "node2":f1;
      "node1":f2 -> "node3":f1;
      "node2":f2 -> "node8":f1;
      "node2":f0 -> "node7":f1;
      "node4":f2 -> "node6":f1;
      "node4":f0 -> "node5":f1;
    }

  • 相关阅读:
    Cookie操作
    C# 操作Cookie类
    面向对象之struct
    高薪程序员都避开了那些坑【安晓辉】
    [转]C#之反射
    [转]正则表达式相关:C# 抓取网页类(获取网页中所有信息)
    membership 在web.config中配置信息
    面向对象之virtual
    面向对象之多态
    JAVA面向对象 接口
  • 原文地址:https://www.cnblogs.com/baby123/p/14246829.html
Copyright © 2011-2022 走看看