# Inconsistent edge label positions in a graph with straight and curved edges

Consider this small graph with a straight edge between two nodes and another edge being a loop at one of the two vertices:

Graph[{1 -> 1, 1 -> 2}, EdgeLabels -> {(1 -> 1) -> "E1", (1 -> 2) -> "E2"}]


As you can see, Mathematica 11.2 places the two labels very differently for straight line edges and curved edges. One is placed on top of the edge and the other is placed far away. IMHO both should be on top of the edge by default.

How can I fix this inconsistency and adjust globally label positions for both types of edges?

It is more obvious in the full graph I am currently interested in that the labels of the curved edges should be closer to the edge itself:

• This is because the curve representing the edge is smoothed, and does not go through the point coordinates describing it like it did in earlier versions (8 or 9). Try using an edge shape function that just goes through the points. (I know this is not a solution, but it's useful to know) – Szabolcs Oct 5 '18 at 9:05
• According to the documentation to get a list of built-in settings for EdgeShapeFunction one should enter GraphElementData["Edge"]. However, this does not give me a single useful candidate. It looks like I have to write my own one. Is this correct? – Hotschke Oct 5 '18 at 12:02

Graph[{1 -> 1, 1 -> 2},