Skip to content

Instantly share code, notes, and snippets.

@Rainboylvx
Last active January 27, 2019 15:02
Show Gist options
  • Save Rainboylvx/dcdfd107941b5b797acc9c12822d4332 to your computer and use it in GitHub Desktop.
Save Rainboylvx/dcdfd107941b5b797acc9c12822d4332 to your computer and use it in GitHub Desktop.
graphviz样例
digraph g{
rankdir=LR;
edge[samehead=h1, sametail=t1];
a1->b->c1;
a2->b->c2;
edge[samehead=h2, sametail=t2];
a3->b->c3;
a4->b->c4;
}
digraph G {
graph [splines=ortho];
node [shape=box, style="filled", color=white, fillcolor=lightgrey];
a [label="a"];
b [label="OK ?", shape=diamond, fillcolor=indianred];
c [label="Error", style="rounded, filled"];
d [label="b"];
a -> b -> d;
b -> c [taillabel="No", constraint=false, labeldistance=3];
d:w -> a:w [taillabel="repeat", constraint=false, labeldistance=7];
{rank = same; b; c;};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment