4 -- For simple formatted printing
6 local function printf(fmt
, ...)
7 print(string.format(fmt
, ...))
10 local function gshow(g
)
11 local fn
= os
.tmpname() .. ".dot"
13 os
.execute("dotty "..fn
)
17 -- Provide simple reference for frequently used functions (optional)
18 node
, edge
, subgraph
, cluster
, digraph
, strictdigraph
=
19 gr
.node
, gr
.edge
, gr
.subgraph
, gr
.cluster
, gr
.digraph
, gr
.strictdigraph
21 local f
, err
= assert(loadfile(arg
[1]))
24 printf("Generated 'dot' format:")