Skip to content

Instantly share code, notes, and snippets.

@mjbommar
Created August 8, 2009 15:35
Show Gist options
  • Save mjbommar/164435 to your computer and use it in GitHub Desktop.
Save mjbommar/164435 to your computer and use it in GitHub Desktop.
'''
@date Aug 8, 2009
@author: Michael Bommarito
@contact [email protected]
'''
import igraph, random
from igraph2sonia import igraph2sonia
g = igraph.Graph.Lattice([20,20])
t = 0
for t,v in enumerate(g.vs):
v["time"] = (t, min(200, t + random.randint(10,100)))
v["size"] = random.randint(1,10)
igraph2sonia(g, 'example2.son')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment