├── .gitignore ├── LICENSE ├── README.md └── assets └── images ├── 2017-02-20 ├── DOT_Mindmap.gv ├── DOT_Mindmap.gv.png ├── edge_intro.gv ├── edge_intro.gv.png ├── firstDOT.gv ├── firstDOT.gv.png ├── graph_intro.gv ├── graph_intro.gv.png ├── node_intro.gv └── node_intro.gv.png └── 2017-03-22 └── Koala.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | 2015/* 2 | 2016/* 3 | 2017/* 4 | bin/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome 2 | 3 | **Blog on [issues][]** 4 | 5 | Or 6 | 7 | **Draft on [Gist][], published on [roughdraft][]** 8 | 9 | [issues]: https://github.com/uolcano/blog/issues 10 | [Gist]: https://gist.github.com/uolcano 11 | [roughdraft]: http://uolcano.roughdraft.io/ 12 | -------------------------------------------------------------------------------- /assets/images/2017-02-20/DOT_Mindmap.gv: -------------------------------------------------------------------------------- 1 | digraph mindmap{ 2 | graph [label="DOT-lang learning map", fontsize=12, rankdir=LR]; 3 | edge [color="#0066ff", arrowhead=dot, arrowsize=.8, fontsize=12]; 4 | node [shape=box, style=rounded, fontname="Microsoft Yahei", fontsize=12]; 5 | 6 | tree [label="DOT\n语言 ", style="filled, rouned", fillcolor="#336699", fontsize=20, fontcolor=white]; 7 | 8 | b1 [label="绘制方式 "]; 9 | tree -> {b1 b2 b3 b4}; 10 | 11 | b1_1 [label="命令行\ndot -Tpng -O abc.gv"]; 12 | b1_2 [label="gvedit"]; 13 | b1 -> {b1_1 b1_2}; 14 | 15 | b2 [label="输出格式 "]; 16 | b2_1 [shape=record, label="{bmp|png|jpg|gif|pdf}"]; 17 | b2 -> b2_1; 18 | 19 | b3 [label="布局器 "]; 20 | b3_1 [label="dot\n默认\n有向图 "]; 21 | b3_2 [label="neato\nspring model布局 "]; 22 | b3_3 [label="circo\n圆环 "]; 23 | b3_4 [label="twopi\n径向 "]; 24 | b3_5 [label="fdp\n无向图 "]; 25 | b3_6 [label="sfdp\n大尺寸的无向图 "]; 26 | b3_7 [label="osage\n紧凑的图集群 "]; 27 | b3 -> {b3_1 b3_2 b3_3 b3_4 b3_5 b3_6 b3_7}; 28 | 29 | b4 [label="语法 "]; 30 | b4 -> {b4_1 b4_2 b4_3 b4_4 b4_5}; 31 | 32 | b4_1 [label="ID"]; 33 | b4_1 -> {b4_1_1 b4_1_2} 34 | 35 | b4_1_1 [label="字符 "]; 36 | b4_1_1_1 [label=<字母
数字
下划线>]; 37 | b4_1_1 -> b4_1_1_1; 38 | 39 | b4_1_2 [label="字符串 "]; 40 | b4_1_2_1 [label="双引号\"...\"包裹 "]; 41 | b4_1_2_2 [label="尖括号\<...\>包裹"]; 42 | b4_1_2 -> {b4_1_2_1 b4_1_2_2}; 43 | 44 | b4_2 [label="关键字 "]; 45 | b4_2 -> {b4_2_1 b4_2_2 b4_2_3 b4_2_4 b4_2_5 b4_2_6}; 46 | 47 | b4_2_1 [label="graph"]; 48 | b4_2_2 [label="digraph"]; 49 | b4_2_3 [label="subgraph"]; 50 | b4_2_3_1 [label="cluster"]; 51 | b4_2_3 -> b4_2_3_1; 52 | 53 | b4_2_4 [label="edge"]; 54 | b4_2_5 [label="node"]; 55 | b4_2_6 [label="strict"]; 56 | 57 | b4_3 [label="字符串 "]; 58 | b4_3_1 [label="换行:\n\"Hello\\\nworld\" "]; 59 | b4_3_2 [label="拼接:\n\"Hello\"+\"world\" "]; 60 | b4_3 -> {b4_3_1 b4_3_2 b4_3_3 b4_3_4}; 61 | 62 | b4_3_3 [label="转义 "]; 63 | b4_3_3_1 [label="\\\""]; 64 | b4_3_3_2 [label="\\\\"]; 65 | b4_3_3 -> {b4_3_3_1 b4_3_3_2}; 66 | 67 | b4_3_4 [label="实体字符\n如:\&\; &delta\;"]; 68 | 69 | b4_4 [label="分组符号 "]; 70 | b4_4 -> {b4_4_1 b4_4_2}; 71 | 72 | b4_4_1 [label="\[...\]"]; 73 | b4_4_1_1 [label="属性定义 "]; 74 | b4_4_1 -> b4_4_1_1; 75 | 76 | b4_4_2 [label="\{...\}"]; 77 | b4_4_2_1 [label="图的声明"]; 78 | b4_4_2_2 [label="简写多节点连接\n如:a -- \{b c\} "]; 79 | b4_4_2_3 [label="node [shape=record, label=\"\{x\|y\|z\}\"]"]; 80 | b4_4_2 -> {b4_4_2_1 b4_4_2_2 b4_4_2_3}; 81 | 82 | b4_5 [label="属性 "]; 83 | b4_5_1 [label="label"]; 84 | b4_5_2 [label="shape"]; 85 | b4_5_3 [label="style"]; 86 | b4_5_4 [label="fillcolor"]; 87 | b4_5_5 [label="bgcolor"]; 88 | b4_5_6 [label="color"]; 89 | b4_5_7 [label="fontcolor"]; 90 | b4_5_8 [label="fontname"]; 91 | b4_5_9 [label="fontsize"]; 92 | b4_5_10 [label="rankdir"]; 93 | b4_5_11 [label="dir"]; 94 | b4_5_12 [label="arrowhead"]; 95 | b4_5_13 [label="arrowtail"]; 96 | b4_5_14 [label="arrowsize"]; 97 | b4_5 -> {b4_5_1 b4_5_2 b4_5_3 b4_5_4 b4_5_5 b4_5_6 b4_5_7 b4_5_8 b4_5_9 b4_5_10 b4_5_11 b4_5_12 b4_5_13 b4_5_14}; 98 | } -------------------------------------------------------------------------------- /assets/images/2017-02-20/DOT_Mindmap.gv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-02-20/DOT_Mindmap.gv.png -------------------------------------------------------------------------------- /assets/images/2017-02-20/edge_intro.gv: -------------------------------------------------------------------------------- 1 | digraph edge_intro { 2 | graph [label="连线示例 ", fontname="Microsoft Yahei"]; 3 | edge [fontname="Microsoft Yahei"]; 4 | node [fontname="Microsoft Yahei"]; 5 | 6 | style0 [label="以下是连线样式示例 "]; 7 | style1, style2, style3, style4 [label=""]; 8 | 9 | style0 -> style1 [style=solid, label="实线 "]; 10 | style1 -> style2 [style=bold, label="粗线 "]; 11 | style2 -> style3 [style=dashed, label="短划线 "]; 12 | style3 -> style4 [style=dotted, label="虚线 "]; 13 | 14 | arrow0 [label="以下是箭头形状示例 "]; 15 | arrow1, arrow2, arrow3, arrow4, arrow5, arrow6, arrow7, arrow8 [label=""]; 16 | 17 | arrow0 -> arrow1 [dir=both, label="双向 "]; 18 | arrow1 -> arrow2 [arrowsize=2, label="大箭头 "]; 19 | arrow2 -> arrow3 [arrowhead=box, label="方块 "]; 20 | arrow3 -> arrow4 [arrowhead=diamond, label="菱形 "]; 21 | arrow4 -> arrow5 [arrowhead=curve, label="弧形 "]; 22 | arrow5 -> arrow6 [arrowhead=normal, label="默认的三角形 "]; 23 | arrow6 -> arrow7 [arrowhead=dot, label="圆点 "]; 24 | arrow7 -> arrow8 [arrowhead=oboxdotrveecurve, label="镂空方块 圆点 半边箭头\n圆弧 构成的复合图形 ", fontsize=12]; 25 | 26 | color0 [label="以下是连线颜色示例 "]; 27 | color1, color2, color3 [label=""]; 28 | 29 | color0 -> color1 [color=blue, label="蓝色 "]; 30 | color1 -> color2 [color="red:blue", label="双色 "]; 31 | color2 -> color3 [color="red:green;0.4:blue", label="多颜色分段 "]; 32 | } -------------------------------------------------------------------------------- /assets/images/2017-02-20/edge_intro.gv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-02-20/edge_intro.gv.png -------------------------------------------------------------------------------- /assets/images/2017-02-20/firstDOT.gv: -------------------------------------------------------------------------------- 1 | digraph abc { 2 | a -> b; 3 | b -> c; 4 | b -> d; 5 | } -------------------------------------------------------------------------------- /assets/images/2017-02-20/firstDOT.gv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-02-20/firstDOT.gv.png -------------------------------------------------------------------------------- /assets/images/2017-02-20/graph_intro.gv: -------------------------------------------------------------------------------- 1 | digraph graph_intro { 2 | graph [bgcolor=lemonchiffon, fontsize=24, fontcolor=limegreen, rankdir=LR, fontname="Microsoft Yahei", label="图的名称"]; 3 | 4 | node0 -> {node1, node2}; 5 | node2 -> node3; 6 | } -------------------------------------------------------------------------------- /assets/images/2017-02-20/graph_intro.gv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-02-20/graph_intro.gv.png -------------------------------------------------------------------------------- /assets/images/2017-02-20/node_intro.gv: -------------------------------------------------------------------------------- 1 | digraph node_intro { 2 | graph [label="节点示例 ", fontname="Microsoft Yahei"]; 3 | node [fontname="Microsoft Yahei"]; 4 | 5 | shape1 [shape=box, label="矩形 "]; 6 | shape2 [shape=circle, label="圆形 "]; 7 | shape3 [shape=ellipse, label="椭圆 "]; 8 | shape4 [shape=polygon, sides=4, skew=0.4, label="平行四边形 "]; 9 | shape5 [shape=diamond, label="菱形 "]; 10 | shape6 [shape=record, label="{record#1|record#2|record#3}"]; 11 | shape7 [shape=none, label="无边框 "]; 12 | shape1:s -> shape2 -> shape3 -> shape4 -> shape5 -> shape6 -> shape7; 13 | 14 | color1 [color=blue, label="蓝色边框 "]; 15 | color2 [style=filled, fillcolor=green, label="绿色填充 "]; 16 | color3 [color="#0000ff", style=filled, fillcolor="green:red", label="蓝色边框\n+\n由绿到红渐变色填充 "]; 17 | color1 -> color2 -> color3; 18 | 19 | text1 [shape=box, fontsize=12, label="小字体 "]; 20 | text2 [shape=box, fontsize=24, label="大字体 "]; 21 | text3 [shape=box, fontcolor=blue, label="蓝色字体 "]; 22 | text4 [shape=box, label=< 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
类HTML标签
加粗 下划线 斜体
33 | >]; 34 | text1 -> text2 -> text3 -> text4; 35 | } -------------------------------------------------------------------------------- /assets/images/2017-02-20/node_intro.gv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-02-20/node_intro.gv.png -------------------------------------------------------------------------------- /assets/images/2017-03-22/Koala.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uolcano/blog/c833a619c9a2b9f4eaed7fb20a1fcf8d3e373455/assets/images/2017-03-22/Koala.jpg --------------------------------------------------------------------------------