0

I'm trying to create a chart with bars. The bars should have no separation in between besides after every nth bar.

So in other words the bars should be displayed in groups of n bars, with no separation inbetween. Inbetween groups there should be a separation.

The bars come from a single \addplot command.

MWE:

\begin{tikzpicture}
    \begin{axis}
        \addplot coordinates {
            (1,5) (2,10) (3,13) (4,18) (5,21) (6,25) (7,30) (8,50) (9,70)
        };
    \end{axis}
\end{tikzpicture}
  • you can group them if you separate the data and plot them individually in n \addplot commands by adding ybar key to axis – percusse Oct 18 '17 at 18:08
  • What is n? As you are plotting particular points I assume it's a particular number, possibly different for different plots? – Andrew Oct 18 '17 at 18:13
  • You could do something similar to the technique used in tex.stackexchange.com/questions/395239 If you're using ybars you want an x expr instead of y expr of course. – Torbjørn T. Oct 19 '17 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.