webweb
webweb copied to clipboard
some questions
Great thanks for your program! I look at it after d3.js, networkx. But have some questions: 1 how to change canvas in code (width & height) ? 2 how to load edgelist to make a layered network automatically? 3 how to add weights to show like in d3.js, networkx ? (labels = nx.get_edge_attributes(G,'weight') nx.draw_networkx_edge_labels(G,pos,edge_labels=labels)) 4 is it possible to switch on edges i want to watch the path from one node to another ?
Hi @zoldaten! Sorry for the delay!
- See https://webwebpage.github.io/docs/documentation/display/height.html for how to change height and https://webwebpage.github.io/docs/documentation/display/width.html for width
- not quite sure how automatic this gets it but... see https://webwebpage.github.io/docs/examples/layers.html for general layers syntax, and you can reasonably make layers in a loop by calling
web.networks.mynetwork.add_layer(nx_G=G)
if you have a networkx object - you can add weights a number of ways! If they are on the networkx object as the
weights
attribute, they'll be added automatically. If you're passing an adjacency matrix, if the values in the matrix are not all 1s, they'll also be added automatically; lastly, if you are passing an edgelist, and the edges are 3 elements long, the third element will be considered a weight - Hm... I'm not quite sure I understand what you mean here — do you mean something like animating the visualization to change from one network to another?
Best, Hunter
thanks for comments. 4. i mean something like all_simple_paths in networx or all_short_paths in it.
Like, is there a way to highlight particular edges? Webweb doesn't currently do that, but it may in a future release :).
Thats will be great! I just started using graphs, here
s my article - https://habr.com/ru/post/525376/
Tried to combine different solutions in this field )