When I use \label and \ref to distinguish two y axes the marks drawn by \ref are no longer on the lines after rotating it together with the rest of the label (see example below). Any ideas?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis y line*=left, scale only axis,
ylabel={estimation 2 \ref{pgf:allsamples}}]
\addplot[blue,mark=+] table {data2.csv};
\label{pgf:allsamples}
\end{axis}
\begin{axis}[axis y line*=right, scale only axis,
ylabel={estimation 1 \ref{pgf:swingvotes}}, ylabel near ticks]
\addplot[red,mark=x] table {data1.csv};
\label{pgf:swingvotes}
\end{axis}
\end{tikzpicture}
\end{document}
