Ask Your Question
1

DiGraph labels?

asked 2011-01-02 18:45:55 +0100

Eviatar Bach gravatar image

updated 2015-01-13 21:54:33 +0100

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 20:45:04 +0100

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-03 01:41:13 +0100 )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 18:45:55 +0100

Seen: 742 times

Last updated: Jan 02 '11