Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (33 sloc) 995 Bytes


brew install graphviz


dot - filter for drawing directed graphs
neato - filter for drawing undirected graphs
twopi - filter for radial layouts of graphs
circo - filter for circular layout of graphs
fdp - filter for drawing undirected graphs
sfdp - filter for drawing large undirected graphs

Plain graph

graph g {
    a -- b ;
    a -- c ;
    a -- d ;

Directed graph

digraph simple_hierarchy {
    B [label="The boss"]      // node B
    E [label="The employee"]  // node E
    B->E [label="commands", fontcolor=darkgreen] // edge B->E

Node styling

node [
  color = "lightyellow"
  style = "filled, bold"
  shape = "Mrecord"

Render directed graph

dot -Tpng -o directed.png


Something went wrong with that request. Please try again.