Skip to main content
3 of 9
added 293 characters in body
kglr
  • 400.5k
  • 18
  • 488
  • 929

Update: Using EdgeShapeFunction:

labels=Reverse@{"A","B","C","D"};
i=1;
Graph[{a->b,a->b,a->b, a->b},
 EdgeShapeFunction->({Text[labels[[i++]],Mean@#],Arrow@#}&)]

enter image description here


Simplest method to convert a Graph g to Graphics is to use Show[g] (see this answer by @becko).

We can post-process Show[g] to modify the Text primitives:

Show[Graph[{Labeled[a->b,"A"],Labeled[a->b,"B"]}]]/. 
   Text["A",{x_,y_/; (y<0.)},z___]:>Text["B",{x,y},z]

enter image description here

Or, we can construct a Graph with modified edge directions (and correct labels) and post-process it to change the edge directions:

Show[Graph[{Labeled[a->b,"A"], Labeled[b->a,"B"]}]]/. 
  BezierCurve[{{-1.,0.},m__,y_}]:>BezierCurve[{{1.,0.},m,{-1.,0.}}]
(* same picture *)
kglr
  • 400.5k
  • 18
  • 488
  • 929