NetworkX

Previous topic

networkx.draw_networkx_edges

Next topic

networkx.draw_networkx_edge_labels

networkx.draw_networkx_labels

draw_networkx_labels(G, pos, labels=None, font_size=12, font_color='k', font_family='sans-serif', font_weight='normal', alpha=1.0, ax=None, **kwds)

Draw node labels on the graph G

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 vertex with node labels as the values. If provided only labels for the keys in the dictionary are drawn.

See draw_networkx for the list of other optional parameters.