-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: draw_networkx_edges() got an unexpected keyword argument 'with_labels' #85
Comments
Hi, Can you give me information about what version of networkx you're running? This is odd because that code runs okay for me. The error is suggesting that when EoN calls |
Hi, |
You may want to add |
my codes:
import networkx as nx
import EoN
import matplotlib.pyplot as plt
G = nx.watts_strogatz_graph(100, 5, 0.9)
nx_kwargs = {"with_labels": True}
sim = EoN.Gillespie_SIR(G, 1, 0.1, return_full_data=True)
t = 0.0
while t < 40:
sim.display(time=t, **nx_kwargs)
plt.show()
t += 0.5
tree = sim.transmission_tree()
hierarchy_tree = EoN.hierarchy_pos(tree)
nx.draw(tree, hierarchy_tree, with_labels=True)
plt.show()
However,I meet some problem:
Traceback (most recent call last):
File "D:\python_project\sir.py", line 15, in
sim.display(time=t, **nx_kwargs)
File "D:\python3.9.10\lib\site-packages\EoN\simulation_investigation.py", line 875, in display
self.display_graph(pos, nodestatus, nodelist, status_order, statuses_to_plot, graph_ax, **nx_kwargs)
File "D:\python3.9.10\lib\site-packages\EoN\simulation_investigation.py", line 639, in display_graph
nx.draw_networkx_edges(self.G, pos, edgelist=edgelist, ax=ax, **nx_kwargs)
TypeError: draw_networkx_edges() got an unexpected keyword argument 'with_labels'
Can you help me to solve this problem,thank you.
The text was updated successfully, but these errors were encountered: