Similarly to this question, I wanted to draw multiple graphs from a single ipython-notebook cell with the following code:
[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)
How can I show multiple graphs from [3] cell on a notebook?
It seems I could use this solution if I wanted to draw some matplotlib charts like this:
[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()
But this is not applicable to igraph graphs AFAICS. Is there some way to convert igraph.drawing.Plot to a more matplotlib familiar object?