(二)Graphivz 简单结构图及子图

一、简单数据结构图

digraph structs {    node [shape=record];    struct1 [shape=record,label="<f0> left|<f1> mid\ dle|<f2> right"];    //record图形,三个属性f0,f1,f2    struct2 [shape=record,label="<f0> one|<f1> two"];    struct3 [shape=record,label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"];    struct1 -> struct2:f1;    //指向struct2 的f1属性    struct1 -> struct3;}

113003989.png


二、子图

digraph g {    subgraph cluster0 {        //我是一个子图,subgraph定义了我,        node[style = filled, color = white];        //我之内的节点都是这种样式        style = filled;        //我的样式是填充        color = lightgrey;        //我的颜色        a0->a1->a2->a3;        label = "prcess #1"        //我的标题    }    subgraph cluster1 {        //我也是一个子图        node[style = filled];        b0->b1->b2->b3;        label = "process #2";        color = blue;    }             }

131744355.png

画一个子图就是subgraph cluster#,必须有cluster 前缀。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值