15 lines
227 B
Python
15 lines
227 B
Python
#!/usr/bin/env python3
|
|
|
|
from igraph import *
|
|
|
|
|
|
def generate_graph():
|
|
g = Graph()
|
|
g.add_vertices(5)
|
|
g.add_edges([(0, 1), (1, 2), (2, 3), (1, 3), (3, 4)])
|
|
plot(g)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
generate_graph()
|