-
Notifications
You must be signed in to change notification settings - Fork 188
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
Vertices plot #223
Comments
Right now, vertices are stored as an attributes on links (pipes, pumps, valves) and can be read in and written to INP files, but they are not used for visualization in WNTR. We’ve talked about updating graphics options in WNTR, but I’m not sure how quickly we’ll get to this. To use vertices in functions like |
@kaklise thanks for the response. It sounds like an interesting feature to work on, just out of my scope at the moment. |
@kaklise Not the prettiest code, but something like the code below should work. I didn't implement the "zip" approach that WNTR uses, but should be easy enough to do. The key is to create a third list for "vertices" and add them to the 'pos' list, but add them with zero size. I didn't change the core WNTR code, just created a quick script to see if it works. But the vertex list should be able to be created within the current link loop within plot_network. --- code snippet --- #restart graph G = nx.MultiDiGraph() for node in pos.keys(): for link in wn.link_name_list:
nx.draw_networkx_nodes(G, pos, nodelist=nodes_list, node_size=20) # real nodes |
Wouldn't this approach break the |
I'm interested in working on this issue. I have some questions, though:
|
Thanks!
There might be additional graphics functions that could make use of this update. |
The Vertices disappear when I make a plot, how can I plot with Vertices? Thanks
The text was updated successfully, but these errors were encountered: