8

I want to label a duplicate edge I have with different labels in an adjacency graph.

So far I have this:

AdjacencyGraph[({
   {1, 1},
   {1, 2}
  }), VertexLabels -> {1 -> "v", 2 -> "u"}, DirectedEdges -> True, 
 EdgeLabels -> {(1 -> 1) -> "δ", (1 -> 2) -> "γ", (2 -> 1) -> "β", (2 -> 2) -> "α"}]

Which gives me this:

enter image description here

Is there a way to label one as α_1 and α_2?

kglr
  • 394,356
  • 18
  • 477
  • 896
Undroid
  • 111
  • 3
  • 1
    I don't think so. It's a problem with Graph's design. http://mathematica.stackexchange.com/questions/92014/issues-adding-properties-to-multigraph – Szabolcs Oct 20 '16 at 01:29

1 Answers1

2
ag = AdjacencyGraph[{{1, 1}, {1, 2}}, 
 VertexLabels -> {1 -> "v", 2 -> "u"}, DirectedEdges -> True, 
 EdgeLabels -> {(1 -> 1) -> "δ", (1 -> 2) -> "γ", (2 -> 1) -> "β", (2 -> 2) -> "α"}];

Module[{i=1}, Show[ag] /. "α" :>Subscript["α", i++]]

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896