Ask Your Question
1

DiGraph labels?

asked 2011-01-02 11:45:55 -0500

Eviatar Bach gravatar image

updated 2015-01-13 14:54:33 -0500

FrédéricC gravatar image

Labels don't seem to work on DiGraphs. For example:

g=DiGraph(vertex_labels=True)

g.add_edge(2,3,label="label")

g.show()

This just shows 2 and 3 as labels. Is this a bug or am I doing something wrong?

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2011-01-02 13:45:04 -0500

DSM gravatar image

Try "g.show(edge_labels=True)". The default is not to show them as they tend to clutter up graphs.

edit flag offensive delete link more

Comments

Thank you, that's what I needed.

Eviatar Bach gravatar imageEviatar Bach ( 2011-01-02 18:41:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-01-02 11:45:55 -0500

Seen: 441 times

Last updated: Jan 02 '11