ref
知乎

variable

Put string "string in node" into n1
node [label="string in node"] n1 

digraph & graph

Connect between node and node
arrow: (digraph)
n0 -> n1 

edge: (graph)
n0 -- n1 

string on arrow/edge
n0 -> n1 [label="on the arrow"] 

Sample

arrow sample: fileName: sample.dot
 digraph graphName {
	node [label="node1 content"] n1;
	node [label="node2 content"] n2;

	n1 -> n2;
}
cmd command:
dot  sample.dot -Tpng -o sample.png

node setting

b [shape=box];
c [shape=triangle];

edge setting

 b -- c [color=blue];
a -- c [style=dotted];

subgraph

digraph have_sub {
	a -> {b,c};
	subgraph sub_bc {
		bgcolor=blue;
		b;
		c;
	}
}