5

I'm trying to modify a simple example of a histogram with symbolic coordinates from the pgfplots 1.14 manual, page 503. This is the example (mwe):

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepgfplotslibrary{statistics}
\usepackage{pgfplotstable}

\begin{document}
  \begin{tikzpicture}
    \begin{axis}[
        ybar interval,
        hist/symbolic coords={A,B,C,D,E,F,G,H,I,J},
        xticklabel={[\tick--\nexttick]}],
      ]
      \addplot+[hist={bins=3}]
        table[row sep=\\,y index=0] {
        data\\
        A\\ B\\ A\\ D\\ F\\ J\\
        G\\ J\\ I\\ H\\ I\\ I\\
        };
    \end{axis}
  \end{tikzpicture}
\end{document}

All I did below was change the letters A-J to lower case:

\begin{tikzpicture}
  \begin{axis}[
      ybar interval,
      hist/symbolic coords={a,b,c,d,e,f,g,h,i,j},
      xticklabel={[\tick--\nexttick]}],
    ]
    \addplot+[hist={bins=3}]
      table[row sep=\\,y index=0] {
      data\\
      a\\ b\\ a\\ d\\ f\\ j\\
      g\\ j\\ i\\ h\\ i\\ i\\
      };
  \end{axis}
\end{tikzpicture}

This results in the following error:

! Package pgfplots Error: Sorry, the input coordinate `a' has not been defined
with 'symbolic hist/data coords={A,B,C,D,E,F,G,H,I,J}... Maybe it has been miss
pelled? Or did you mean something like [normalized]a?.

It seems as if the symbolic coordinates I provide are ignored. Indeed, when replacing the line

hist/symbolic coords={A,B,C,D,E,F,G,H,I,J},

with any of the following lines

hist/symbolic coords,
hist/symbolic coords={a,b,c,d,e,f,g,h,i,j},
hist/symbolic coords={k,l,m,n,o,p,q,r,s,t},

there is no error.

Am I doing something wrong, or is this a bug?

closed as off-topic by Stefan Pinnow, Henri Menke, Maarten Dhondt, Schweinebacke, TeXnician Jun 26 '17 at 5:58

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I'll consider this as a bug which I have reported here. – Stefan Pinnow Sep 18 '16 at 17:36
  • 4
    I'm voting to close this question because because the bug is solved in PGFPlots v1.15 – Stefan Pinnow Jun 26 '17 at 4:28
1

This is a bug. Thanks for the report and thanks for the bug report https://sourceforge.net/p/pgfplots/bugs/134/! I will take care of it

Not the answer you're looking for? Browse other questions tagged or ask your own question.