Update notebooks and scripts

This commit is contained in:
Dimitri Lozeve 2018-09-10 10:30:45 +01:00
parent aedd94d4af
commit 69afa83517
41 changed files with 2896 additions and 469 deletions

18
spplot.py Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env python3
import numpy as np
import igraph as ig
import matplotlib
matplotlib.use("PDF")
import matplotlib.pyplot as plt
plt.style.use("fivethirtyeight")
plt.rcParams["figure.figsize"] = (10, 6)
if __name__=="__main__":
g = ig.read("data/sociopatterns/infectious/infectious.graphml")
g.simplify()
layout = g.layout_grid_fruchterman_reingold()
# layout = g.lgl()
ig.plot(g, layout=layout)