Reputation: 3
I have created the following graph using NetworkX in Python. I have two related questions.
What determine the edges' lengths and the lengths of the thick parts of the edges?
I would like either the length of the thick part of the edges or the length of the edges to represent the weights I assigned to each edge. It is not the case in this graph, even though each edge has the wanted weight (when I check using G.get_edge_data()). How to represent these weights on the graph?
Any help is much appreciated.
Upvotes: 0
Views: 258
Reputation: 23827
The lengths of the "arrowheads" is set to be 25% of the line width (from node center to node center). This appears to be hardcoded in so it cannot be changed.
Instead, you can use the keyword "width" (see the documentation) combined with an "edgelist" so that it knows which edge gets which width.
width : float, or array of floats Line width of edges (default=1.0)
Upvotes: 0