Examples

The following section provides some LuaGRAPH programming examples.

modgraph.lua

Lists the module dependencies on a Linux computer. 

modgraph.png

render.lua

Reads a graph definition from a file and displays the graph using dotty.

Graph: random.lua

Creates 10 nodes and connects them randomly.

random.png

tablegraph.lua

Maps a table to a graph using records for the tables. 

The following example shows a two-dimensional array.

table_array.png

The following examples shows the module "luasocket" as graph.

table_socket.png