A simple example showing how to use the graph interface for in python.
13 vs.append(g.add_vertex(ps[-1]));
14 g.add_edge(vs[0], vs[1])
15 g.add_edge(vs[1], vs[2])
22 print "Oh well, no altgraph"
27 matplotlib.use(
"macosx")
28 import matplotlib.pyplot
as plt
31 xg=IMP.get_networkx_graph(g)
39 print "networkx not fully installed"
47 print "oh well, something not working with graphviz"
51 for n
in g.get_in_neighbors(8):
52 print g.get_vertex_name(n).get_name()