Ask Your Question

Labeling in graphs

asked 2013-07-06 09:02:35 -0600

sanjith gravatar image

updated 2016-06-06 14:23:27 -0600

FrédéricC gravatar image

I am new to SAGE and am trying to experiment with it. What I am trying to do is something like this -

k = 1

G.add_edge((1,2), label= 'k')

Then it should label the edge as '1', not as 'k'. How would I do this?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-07-06 09:53:54 -0600

calc314 gravatar image

Try label=str(k).

edit flag offensive delete link more


Thank you, it works.

sanjith gravatar imagesanjith ( 2013-07-06 09:55:18 -0600 )edit

@sanjith - if the answer works, please do click the acceptance check mark :)

kcrisman gravatar imagekcrisman ( 2013-07-06 15:13:28 -0600 )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


Asked: 2013-07-06 09:02:35 -0600

Seen: 139 times

Last updated: Jul 06 '13