# Pgfplots ybar option draws tickmarks outside the plot area

I'm seeing x tick marks drawn outside the plot area when ybar is active. Is this expected, why, and how can it be prevented?

Here's a MWE:

\documentclass{article}

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

\begin{document}

\begin{tikzpicture}
\begin{axis}[
title=Test,
xlabel={X label},
ylabel={Y label},
ybar
]
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[
title=Test,
xlabel={X label},
ylabel={Y label},
%ybar
]
\end{axis}
\end{tikzpicture}

\end{document}


Yes, this is by design. It makes sense to align the tick marks on the outside of the plot area, since especially the bottom ones are otherwise easily hidden by the columns of the plot (unless you're using axis on top, that is).
If you want the tick marks to be aligned on the inside of the plot area, set xtick align=inside.