Currently an error is raised when one wants to use bar width
, bar shift
or enlargelimits
in axis units. Please allow this. (Are there other keys where this feature would be useful, too?)
(Then providing an answer for http://tex.stackexchange.com/questions/355401/remove-the-space-between-bars-and-axis would have been much easier than redefining the whole plot.)
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.14,
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar,
symbolic x coords={tool8,tool9,tool10},
xtick=data,
% % ---------------------------------------------------------------------
% % currently not allowed:
% bar width=0.5,
% bar shift=-0.25,
% {bar width=[normalize]0.5},
% {bar shift=[normalzie]-0.25},
% enlargelimits={abs=0.5},
% % ---------------------------------------------------------------------
]
\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
\end{axis}
\end{tikzpicture}
\end{document}