NetworkX

Previous topic

networkx.draw_networkx_labels

Next topic

networkx.draw_circular

networkx.draw_networkx_edge_labels

draw_networkx_edge_labels(G, pos, edge_labels=None, font_size=10, font_color='k', font_family='sans-serif', font_weight='normal', alpha=1.0, bbox=None, ax=None, **kwds)

Draw edge labels.

pos is a dictionary keyed by vertex with a two-tuple of x-y positions as the value. See networkx.layout for functions that compute node positions.

labels is an optional dictionary keyed by edge tuple with labels as the values. If provided only labels for the keys in the dictionary are drawn. If not provided the edge data is used as a label.

See draw_networkx for the list of other optional parameters.