Skip to content

Instantly share code, notes, and snippets.

@SureshKL
Last active March 22, 2019 10:31
Show Gist options
  • Save SureshKL/d10e6be837718545df033fa9ee5f7f5d to your computer and use it in GitHub Desktop.
Save SureshKL/d10e6be837718545df033fa9ee5f7f5d to your computer and use it in GitHub Desktop.
Dot Template
# PDF Generate Cmd: dot -Tpdf demo.gv > demo.pdf
# Dot Guide: https://www.graphviz.org/pdf/dotguide.pdf
# Examples:
# https://renenyffenegger.ch/notes/tools/Graphviz/examples/index
#
digraph G {
label = "The Title";
labelloc = "top"; // place the label at the top (b seems to be default)
# Global Node styles
node [fontcolor=crimson, style=filled, color=lightgrey];
edge [color=grey];
# Specific Node styles
"start" [color=mediumspringgreen, fontcolor=black];
"end" [color=mediumspringgreen, fontcolor=black];
A [shape=diamond]
B [shape=box]
C [shape=circle]
subgraph cluster0 {
style=rounded;
color=lightgrey;
label = "Cluster Label";
labeljust = left;
# Nodes
A -> B [style=dashed, color=grey]
A -> C [color="black:invis:black"]
A -> D [penwidth=5, arrowhead=none]
}
start -> A
B -> end
C -> end
D -> end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment