\documentclass[a4paper]{article}

\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}
	\addplot {x} node[pos=0] {0} node[pos=0.25] {0.25} node[pos=0.5] {0.5} node[pos=0.7] {0.7};
	\end{axis}
\end{tikzpicture}

\begin{tikzpicture}[/tikz/sloped]
%\tracingcommands=2\tracingmacros=2
	\begin{axis}
	\addplot {x} node[pos=0] {0} node[pos=0.25] {0.25} node[pos=0.5] {0.5} node[pos=0.7] {0.7};
	\end{axis}
\end{tikzpicture}
\end{document}

