First time here? Check out the FAQ!

Ask Your Question
0

Labeling in graphs

asked 11 years ago

sanjith gravatar image

updated 8 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

calc314 gravatar image

Try label=str(k).

Preview: (hide)
link

Comments

Thank you, it works.

sanjith gravatar imagesanjith ( 11 years ago )

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

kcrisman gravatar imagekcrisman ( 11 years ago )

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: 11 years ago

Seen: 848 times

Last updated: Jul 06 '13