Similarly to this question, je voulais dessiner plusieurs graphiques à partir d'une seule cellule ipython-portable avec le code suivant:dessiner plusieurs graphiques python-iGRAPH de simple jupyter/ipython cellule
[1]:
%matplotlib inline
import igraph # it is `pip install python-igraph` on py2
import matplotlib.pyplot as plt
import numpy as np
[2]:
# draws a graph successfully
igraph.plot(igraph.Graph.Erdos_Renyi(10, .5))
[3]:
for p in np.arange(.3, .8, .1):
g = igraph.Graph.Erdos_Renyi(10, p)
igraph.plot(g)
Comment puis-je afficher des graphiques multiples de [3]
cellule sur un ordinateur portable?
Il semble que je pourrais utiliser cette solution si je voulais tirer quelques graphiques matplotlib comme ceci:
[4]:
for p in np.arange(.3, .8, .1):
g = igraph.Graph.Erdos_Renyi(10, p)
plt.loglog(sorted(g.degree(), reverse=True), marker='o')
plt.show()
Mais ce n'est pas applicable aux iGRAPH AFAICS des graphiques. Y at-il un moyen de convertir igraph.drawing.Plot
en un objet familier plus matplotlib?