I need a bar plot (containing multiple \addplot) with following requirements:
- ticks between x labels (and, in this respect, my question differs from Adjusting width of ybar interval separator to width of histogram bars),
- non zero space between bars of adjacent x coordinates,
- zero space between bars corresponding to the same x coordinate.
I could manage the requirements:
- by using a
ybar intervalplot, - by using a value
<1for theybar intervaloption.
as shown by the following MWE:
\documentclass{article} \usepackage{pgfplots} \usepackage{filecontents} % \pgfplotsset{compat=1.11} % \begin{filecontents}{data.txt} A B C D 0 13 9 19 1 0 1 5.5 2 0 4 4 3 1 3 14.5 4 3 8 6 5 1 8 6.5 6 2 5 5.5 7 0 7 14 8 8 14 6 9 0 5 12.5 10 0 14 17.5 \end{filecontents} % \begin{document} \begin{tikzpicture} \begin{axis}[% ybar interval=0.5,% width=\textwidth% ] \addplot table[x=A,y=B]{data.txt}; \addplot table[x=A,y=C]{data.txt}; \addplot table[x=A,y=D]{data.txt}; \end{axis} \end{tikzpicture} \end{document} 
But I don't know how to remove the horizontal space between the bars of a same "interval". How could I achieve this?
