Narysuj wykres NetworkX za pomocą PLT.PAUSE

plt.clf()
nx.draw(G)
plt.pause(1) # 1 here is time gap
z_z