使用graphviz软件的dot工具来制作层级结构图

 时间:2024-11-14 09:53:15

1、打开文本编辑器,输入dot脚本,文件保存为 1.dot ; 脚本比较复杂,但是通过GVedit工具来查看结构,还是可以看清楚的.主要是通过subgraph 创造 子图,其他的都是顺序构造digraph cluster_1_xx {subgraph cluster_1_xx_0_0 {color=lightcyan;style=filled;fillcolor=lightgrey;label = cluster_1_xx_0_0;n_0_0 ;n_0_1 ;n_0_2 ;}subgraph cluster_1_xx_1_0 {color=mediumseagreen;style=filled;fillcolor=saddlebrown;label = cluster_1_xx_1_0;n_1_0 ;n_1_1 ;n_1_2 ;}subgraph cluster_1_xx_1_1 {color=mediumseagreen;style=filled;fillcolor=saddlebrown;label = cluster_1_xx_1_1;n_1_3 ;n_1_4 ;n_1_5 ;}subgraph cluster_1_xx_1_2 {color=mediumseagreen;style=filled;fillcolor=saddlebrown;label = cluster_1_xx_1_2;n_1_6 ;n_1_7 ;n_1_8 ;}subgraph cluster_1_xx_2_0 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_0;n_2_0 ;n_2_1 ;n_2_2 ;}subgraph cluster_1_xx_2_1 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_1;n_2_3 ;n_2_4 ;n_2_5 ;}subgraph cluster_1_xx_2_2 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_2;n_2_6 ;n_2_7 ;n_2_8 ;}subgraph cluster_1_xx_2_3 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_3;n_2_9 ;n_2_10 ;n_2_11 ;}subgraph cluster_1_xx_2_4 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_4;n_2_12 ;n_2_13 ;n_2_14 ;}subgraph cluster_1_xx_2_5 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_5;n_2_15 ;n_2_16 ;n_2_17 ;}subgraph cluster_1_xx_2_6 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_6;n_2_18 ;n_2_19 ;n_2_20 ;}subgraph cluster_1_xx_2_7 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_7;n_2_21 ;n_2_22 ;n_2_23 ;}subgraph cluster_1_xx_2_8 {color=aquamarine;style=filled;fillcolor=coral;label = cluster_1_xx_2_8;n_2_24 ;n_2_25 ;n_2_26 ;}subgraph cluster_1_xx_3_0 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_0;n_3_0 ;n_3_1 ;n_3_2 ;}subgraph cluster_1_xx_3_1 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_1;n_3_3 ;n_3_4 ;n_3_5 ;}subgraph cluster_1_xx_3_2 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_2;n_3_6 ;n_3_7 ;n_3_8 ;}subgraph cluster_1_xx_3_3 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_3;n_3_9 ;n_3_10 ;n_3_11 ;}subgraph cluster_1_xx_3_4 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_4;n_3_12 ;n_3_13 ;n_3_14 ;}subgraph cluster_1_xx_3_5 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_5;n_3_15 ;n_3_16 ;n_3_17 ;}subgraph cluster_1_xx_3_6 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_6;n_3_18 ;n_3_19 ;n_3_20 ;}subgraph cluster_1_xx_3_7 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_7;n_3_21 ;n_3_22 ;n_3_23 ;}subgraph cluster_1_xx_3_8 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_8;n_3_24 ;n_3_25 ;n_3_26 ;}subgraph cluster_1_xx_3_9 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_9;n_3_27 ;n_3_28 ;n_3_29 ;}subgraph cluster_1_xx_3_10 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_10;n_3_30 ;n_3_31 ;n_3_32 ;}subgraph cluster_1_xx_3_11 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_11;n_3_33 ;n_3_34 ;n_3_35 ;}subgraph cluster_1_xx_3_12 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_12;n_3_36 ;n_3_37 ;n_3_38 ;}subgraph cluster_1_xx_3_13 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_13;n_3_39 ;n_3_40 ;n_3_41 ;}subgraph cluster_1_xx_3_14 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_14;n_3_42 ;n_3_43 ;n_3_44 ;}subgraph cluster_1_xx_3_15 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_15;n_3_45 ;n_3_46 ;n_3_47 ;}subgraph cluster_1_xx_3_16 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_16;n_3_48 ;n_3_49 ;n_3_50 ;}subgraph cluster_1_xx_3_17 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_17;n_3_51 ;n_3_52 ;n_3_53 ;}subgraph cluster_1_xx_3_18 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_18;n_3_54 ;n_3_55 ;n_3_56 ;}subgraph cluster_1_xx_3_19 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_19;n_3_57 ;n_3_58 ;n_3_59 ;}subgraph cluster_1_xx_3_20 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_20;n_3_60 ;n_3_61 ;n_3_62 ;}subgraph cluster_1_xx_3_21 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_21;n_3_63 ;n_3_64 ;n_3_65 ;}subgraph cluster_1_xx_3_22 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_22;n_3_66 ;n_3_67 ;n_3_68 ;}subgraph cluster_1_xx_3_23 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_23;n_3_69 ;n_3_70 ;n_3_71 ;}subgraph cluster_1_xx_3_24 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_24;n_3_72 ;n_3_73 ;n_3_74 ;}subgraph cluster_1_xx_3_25 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_25;n_3_75 ;n_3_76 ;n_3_77 ;}subgraph cluster_1_xx_3_26 {color=darkslateblue;style=filled;fillcolor=darkgreen;label = cluster_1_xx_3_26;n_3_78 ;n_3_79 ;n_3_80 ;}n_3_78 ;n_3_79 ;n_3_80 ;n_0_0 -> n_1_0 ;n_0_0 -> n_1_1 ;n_0_0 -> n_1_2 ;n_0_1 -> n_1_3 ;n_0_1 -> n_1_4 ;n_0_1 -> n_1_5 ;n_0_2 -> n_1_6 ;n_0_2 -> n_1_7 ;n_0_2 -> n_1_8 ;n_1_0 -> n_2_0 ;n_1_0 -> n_2_1 ;n_1_0 -> n_2_2 ;n_1_1 -> n_2_3 ;n_1_1 -> n_2_4 ;n_1_1 -> n_2_5 ;n_1_2 -> n_2_6 ;n_1_2 -> n_2_7 ;n_1_2 -> n_2_8 ;n_1_3 -> n_2_9 ;n_1_3 -> n_2_10 ;n_1_3 -> n_2_11 ;n_1_4 -> n_2_12 ;n_1_4 -> n_2_13 ;n_1_4 -> n_2_14 ;n_1_5 -> n_2_15 ;n_1_5 -> n_2_16 ;n_1_5 -> n_2_17 ;n_1_6 -> n_2_18 ;n_1_6 -> n_2_19 ;n_1_6 -> n_2_20 ;n_1_7 -> n_2_21 ;n_1_7 -> n_2_22 ;n_1_7 -> n_2_23 ;n_1_8 -> n_2_24 ;n_1_8 -> n_2_25 ;n_1_8 -> n_2_26 ;n_2_0 -> n_3_0 ;n_2_0 -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> n_3_65 ;n_2_22 -> n_3_66 ;n_2_22 -> n_3_67 ;n_2_22 -> n_3_68 ;n_2_23 -> n_3_69 ;n_2_23 -> n_3_70 ;n_2_23 -> n_3_71 ;n_2_24 -> n_3_72 ;n_2_24 -> n_3_73 ;n_2_24 -> n_3_74 ;n_2_25 -> n_3_75 ;n_2_25 -> n_3_76 ;n_2_25 -> n_3_77 ;n_2_26 -> n_3_78 ;n_2_26 -> n_3_79 ;n_2_26 -> n_3_80 ;}

2、运行命令dot -Tpng 1.dot -o 1.png

3、查看1.png图片,如下

使用graphviz软件的dot工具来制作层级结构图
  • 事业单位公文写作技巧
  • 空格替换为无
  • 怎么设置段中不分页?
  • word数字格式设置
  • 行与行之间的空段怎么删除?
  • 热门搜索
    母亲节手抄报简单字少 田园风光手抄报 元宵节手抄报大全 手抄报 春节 热爱劳动手抄报 一年级清明节手抄报 世界无烟日手抄报图片 英雄事迹手抄报 奥运会手抄报 小学三年级手抄报