Ask Your Question
0

Labeling in graphs

asked 2013-07-06 16:02:35 +0100

sanjith gravatar image

updated 2016-06-06 21:23:27 +0100

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
0

answered 2013-07-06 16:53:54 +0100

calc314 gravatar image

Try label=str(k).

edit flag offensive delete link more

Comments

Thank you, it works.

sanjith gravatar imagesanjith ( 2013-07-06 16:55:18 +0100 )edit

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

kcrisman gravatar imagekcrisman ( 2013-07-06 22:13:28 +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: 2013-07-06 16:02:35 +0100

Seen: 143 times

Last updated: Jul 06 '13