def visualization(metadata, filename):
print "--- VISUALIZATION ---"
g = graph.AGraph(directed=True)
for k, v in metadata.items():
for x in xrange(len(v)):
node, zf = v[x].split('^')
g.add_edge(k, node, len="2.1", label=zf, rankdir="LR")
#print "adding %s -> %s" % (k, node)
filename = os.path.basename(filename)
g.layout(prog='dot')
picture = "%s-%s.png" % (filename, "image")
print "[+] Generating %s" % picture
g.draw(picture)
评论列表
文章目录