I am trying to use pgfplots to add slope triangles to several plots on the same axis which look like the following:

I thought I was in luck to see parts of this process explained specifically in the pgfplots documentation, but as you can see from the output, the right sides of the slope triangles are not aligned. I originally thought this was related to the coordinate [pos=...] command using arc length instead of x (or y) distance, but I don't think this can explain why the middle triangle is the furthest to the right.
Here is the code (some non-essentials removed):
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[%
width=0.962707\textwidth,
height=0.75\textwidth,
xlabel={mesh size, $h^e$},
xmax=0.1,
ylabel={$L_2$ Error}
]
\addplot table[row sep=crcr]{%
0.052 0.08922\\
0.026 0.03718\\
0.013 0.01128\\
0.0065 0.00301\\
0.00325 0.00076\\
}
% add slope triangle
coordinate [pos=0.95] (A)
coordinate [pos=0.75] (B)
;
\draw (A) -| (B)
node [pos=.75,anchor=west]{$2.0$};
\addplot table[row sep=crcr]{%
0.052 0.02903\\
0.026 0.00918\\
0.013 0.00219\\
0.0065 0.00050\\
0.00325 0.00012\\
}
% add slope triangle
coordinate [pos=0.95] (A)
coordinate [pos=0.75] (B)
;
\draw (A) -| (B)
node [pos=.75,anchor=west]{$2.0$};
\end{loglogaxis}
\end{tikzpicture}%
\end{document}
I am aware that the tables are ordered in reverse (right to left), but changing this did not seem to make a difference. Can someone please explain what is going on and how to correct it
Also, if it is possible to compute slope values of the labeled segment automatically, that would be extremely helpful, as I have several of these plots each with unique data.
