When I use both "bar width" and "symbolic x", pdflatex gives me the following error message:
! Package pgfkeys Error: I do not know the key '/pgfplots/bar width' and I am going to ignore it. Perhaps you misspelled it.
Do you have any idea how I can choose the bar size with "symbolic x" option ?
\documentclass{standalone}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\pgfplotsset{
compat=newest,
ybar stacked,
symbolic x coords={val1,val2,val3},
%bar width=1,% doest not work
}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[black!40,pattern=north west lines, pattern color=blue] coordinates
{(val1,36.8539) (val2,33.7547) (val3,13.7547)};
\addplot[black!40,pattern=north west lines, pattern color=red] coordinates
{(val1,13.47) (val2,12.7187) (val3,22.7187)};
\end{axis}
\end{tikzpicture}
\end{document}