\documentclass{article}
% translate with >> pdflatex -shell-escape <file>

% This file is used as unit test for pgfplots, copyright by Christian Feuersaenger.
% 
% See
%   http://pgfplots.sourceforge.net/pgfplots.pdf
% for pgfplots.
%
% Any required input files (for <plot table> or <plot file> or the table package) can be downloaded
% at
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/
% and
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/

\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\pagestyle{empty}

\begin{document}
	\pgfplotsset{
		clip=false,
		xlabel=$x$ label,
		ylabel=$y$ label,
		zlabel=$z$ label,
			ticklabel style={draw=red},
			label style={draw=red},
			xlabel style={name=xlabel},
			ylabel style={name=ylabel},
			zlabel style={name=zlabel},
		extra description/.add code={%
			\draw[blue,thick,->] (xticklabel cs:0,0) -- (xticklabel cs:1,0);
			\draw[blue,thick,->] (yticklabel cs:0,0) -- (yticklabel cs:1,0);
			\ifpgfplotsthreedim
			\draw[blue,thick,->] (zticklabel cs:0,0) -- (zticklabel cs:1,0);
			\fi
			%
			\draw[red,thick,->] (xticklabel cs:0.5,0pt) -- (xticklabel cs:0.5,50pt);
			%
			\fill[green] (xlabel.near xticklabel*) circle (2pt);
			\fill[green] (ylabel.near yticklabel*) circle (2pt);
			\ifpgfplotsthreedim
			\fill[green] (zlabel.near zticklabel*) circle (2pt);
			\fi
			%
			\fill[orange] (xlabel.near xticklabel) circle (2pt);
			\fill[orange] (ylabel.near yticklabel) circle (2pt);
			\ifpgfplotsthreedim
			\fill[orange] (zlabel.near zticklabel) circle (2pt);
			\fi
			%
		},
	}
\begin{tikzpicture}
		\begin{axis}
			\addplot+[samples=3] {x};
		\end{axis}
	\end{tikzpicture}
\end{document}
