-
Notifications
You must be signed in to change notification settings - Fork 154
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
solara: Add virus_on_network network example #56
Conversation
9592ab8
to
67bfde6
Compare
This is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to change from viz to model, otherwise just some minor suggestions.
|
||
width = [] # edge width | ||
edge_color = [] | ||
for u, v in graph.edges(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u, v, w and ec are quite not-descriptive. Maybe call it edge_width, edge_color here and above edge_colorss and edge_widths ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edge_color
in NetworkX is a list of edge colors. As much as this is confusing, I have to stay consistent with NetworkX. Ditto with the plural for edge_width
.
u
, v
should be fine for undirected graph, just like i
, j
for 2D grid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See edge_color
in https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx.html, which may be a scalar or vector.
Fixed. |
Waiting until projectmesa/mesa#1767 is merged and we have a release.