Question: How do I Adjust the Position of a Weight Label Along and Edge of a Graph?

Hi,

I am generating several random weighted graphs using the following code:

with(GraphTheory):
with(RandomGraphs):
G:=RandomGraph(10,20,connected):
G1:=AssignEdgeWeights(G,5..25):
DrawGraph(G1,showlabels=true,stylesheet=[edgecolor=blue,weightfont = [times,bold,11]])

By default weight labels appear to be positioned at the midpoint of each edge. Is there a way to change that positioning?

Thanks!

Please Wait...