Support matplotlib 3.7+
In matplotlib 3.7, ArtistList became immutable, so in graph-tool 2.4.6, graph_draw
is failing as it tries to append to the list.
The following code works for matplotlib < 3.7 and fails for 3.7:
import graph_tool.all as gt
import matplotlib.pyplot as plt
plt.switch_backend("cairo")
fig, ax = plt.subplots()
g = gt.collection.data["polbooks"]
gt.graph_draw(g, mplfig=ax)