\documentclass[a4paper]{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.7}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
	ybar=0pt,
	title={compat=1.7},
	bar width=0.5,
	enlargelimits=0.3,
	minor x tick num=3,
]
\addplot plot coordinates
    {(0,3) (1,2) (2,4) (3,1) (4,2)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\pgfplotsset{compat=default}
\begin{axis}[
	ybar=0pt,
	title={compat=default},
	bar width=0.5,
	enlargelimits=0.3,
	minor x tick num=3,
]
\addplot plot coordinates
    {(0,3) (1,2) (2,4) (3,1) (4,2)};
\end{axis}
\end{tikzpicture}



\end{document}

