ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 02 Jan 2011 18:41:13 -0600DiGraph labels?http://ask.sagemath.org/question/7838/digraph-labels/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.Sun, 02 Jan 2011 11:45:55 -0600http://ask.sagemath.org/question/7838/digraph-labels/Answer by DSM for <p>Labels don't seem to work on DiGraphs. For example:</p>
<blockquote>
<p>g=DiGraph(vertex_labels=True)</p>
<p>g.add_edge(2,3,label="label")</p>
<p>g.show()</p>
</blockquote>
<p>This just shows 2 and 3 as labels. Is this a bug or am I doing something wrong?</p>
<p>Thanks in advance.</p>
http://ask.sagemath.org/question/7838/digraph-labels/?answer=11913#post-id-11913Try "g.show(edge_labels=True)". The default is not to show them as they tend to clutter up graphs.
Sun, 02 Jan 2011 13:45:04 -0600http://ask.sagemath.org/question/7838/digraph-labels/?answer=11913#post-id-11913Comment by Eviatar Bach for <p>Try "g.show(edge_labels=True)". The default is not to show them as they tend to clutter up graphs.</p>
http://ask.sagemath.org/question/7838/digraph-labels/?comment=22350#post-id-22350Thank you, that's what I needed.Sun, 02 Jan 2011 18:41:13 -0600http://ask.sagemath.org/question/7838/digraph-labels/?comment=22350#post-id-22350