\documentclass[a4paper]{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.7}

\begin{document}

\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}[axis lines=center,
		xmin=-2,xmax=8,
		ymin=-3,
		ymax=2,
		xlabel=xlabel,
		ylabel=ylabel,
		show outer normals,
	]
	
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\pgfplotsset{compat=1.8}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}[axis lines=center,
		xmin=-2,xmax=8,
		ymin=-3,
		ymax=2,
		xlabel=xlabel,
		ylabel=ylabel,
		show outer normals,
	]
	
	\end{axis}
\end{tikzpicture}

\fbox{%
\begin{tikzpicture}
%\tracingcommands=2\tracingmacros=2
	\begin{axis}[axis lines=center,
		xmin=-2,xmax=8,
		ymin=-3,
		ymax=2,
		zmin=-5,
		zmax=5,
		xlabel=xlabel,
		ylabel=ylabel,
		zlabel=zlabel,
	]
	
	\end{axis}
\end{tikzpicture}%
}%
\fbox{%
\begin{tikzpicture}
	\pgfplotsset{
		compat=1.8,
	}
	\pgfkeysifdefined{/pgfplots/compat/BB/.@cmd}{%
		\pgfplotsset{
			compat/BB=1.7,% no need to check that the BB changed.
		}
	}{}%

%\tracingcommands=2\tracingmacros=2
	\begin{axis}[axis lines=center,
		xmin=-2,xmax=8,
		ymin=-3,
		ymax=2,
		zmin=-5,
		zmax=5,
		xlabel=xlabel,
		ylabel=ylabel,
		zlabel=zlabel,
	]
	
	\end{axis}
\end{tikzpicture}%
}
\end{document}

