Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'm not an expert in the graph theory portion of Sage, but here is what I've found. The position of the label appears to be hard-coded in as the midpoint between the vertices, which is what you want to change. If you look at the answer to Font Size for Edge Label, you'll see there is a line of code that includes a text command. The first argument of the text command is the text to be displayed (the edge label in this case) and the second argument is the position. You'll see the position is programmed to be the midpoint of the edge. You could modify this position to move the label away from the edge.

I realize this is not a pretty solution. Perhaps someone will suggest something simpler.