python - Draw graph in NetworkX -
i'm trying draw graph in networkx, nothing, not errors:
import networkx nx import matplotlib.pyplot plt g1=nx.petersen_graph() nx.draw(g1)
add end:
plt.show()
import networkx nx import matplotlib.pyplot plt g1 = nx.petersen_graph() nx.draw(g1) plt.show()
when run interactive shell plt.ion()
has been called, plt.show()
not needed. why omitted in lot of examples.
if run these commands script (where plt.ion()
has not been called), plt.show()
needed. plt.ion()
okay interactive sessions, not recommended scripts.
Comments
Post a Comment