简体   繁体   中英

Python: Is it possible to set the length of graph edges on pyvis using edge weight as length?

As stated in the subject, I was wondering if it is possible to make edges on pyvis.network show up with the weight of the graph as their actual length. The graph in itself is undirected and around 2000 nodes large, most of which are just intermediate node. If not, are there other libraries that could do the same thing?

Thank you.

You can increase the mass of the nodes, as it is based on a inverted gravity model.

Example

nt.add_node(0, mass=5)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM