Graphviz Notes
来自Jack's Lab
(版本间的差异)
(→Introduction) |
(→Introduction) |
||
第4行: | 第4行: | ||
$ dot test.dot -T png -o test.png | $ dot test.dot -T png -o test.png | ||
</source> | </source> | ||
− | |||
<br><br> | <br><br> | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | <source lang=bash> | ||
+ | digraph automata_0 { | ||
+ | size = "8.5, 11"; | ||
+ | fontname = "Microsoft YaHei"; | ||
+ | fontsize = 10; | ||
+ | |||
+ | node [shape = circle, fontname = "Microsoft YaHei", fontsize = 10]; | ||
+ | edge [fontname = "Microsoft YaHei", fontsize = 10]; | ||
+ | |||
+ | 0 [ style = filled, color=lightgrey ]; | ||
+ | 2 [ shape = doublecircle ]; | ||
+ | |||
+ | 0 -> 2 [ label = "a " ]; | ||
+ | 0 -> 1 [ label = "other " ]; | ||
+ | 1 -> 2 [ label = "a " ]; | ||
+ | 1 -> 1 [ label = "other " ]; | ||
+ | 2 -> 2 [ label = "a " ]; | ||
+ | 2 -> 1 [ label = "other " ]; | ||
+ | |||
+ | "Machine: a" [ shape = plaintext ]; | ||
+ | } | ||
+ | </source> | ||
+ | |||
<br><br> | <br><br> | ||
<br><br> | <br><br> |
2016年4月21日 (四) 11:50的版本
1 Introduction
$ dot test.dot -T png -o test.png
2 Examples
digraph automata_0 { size = "8.5, 11"; fontname = "Microsoft YaHei"; fontsize = 10; node [shape = circle, fontname = "Microsoft YaHei", fontsize = 10]; edge [fontname = "Microsoft YaHei", fontsize = 10]; 0 [ style = filled, color=lightgrey ]; 2 [ shape = doublecircle ]; 0 -> 2 [ label = "a " ]; 0 -> 1 [ label = "other " ]; 1 -> 2 [ label = "a " ]; 1 -> 1 [ label = "other " ]; 2 -> 2 [ label = "a " ]; 2 -> 1 [ label = "other " ]; "Machine: a" [ shape = plaintext ]; }