I found this beautiful example:
\begin{tikzpicture}
\begin{axis}[title = Contributions per category at LaTeX-Community.org,
xbar,
y axis line style = { opacity = 0 },
axis x line = none,
tickwidth = 0pt,
enlarge y limits = 0.2,
enlarge x limits = 0.02,
symbolic y coords = {LaTeX, Tools, Distributions, Editors},
nodes near coords,
]
\addplot coordinates { (57727,LaTeX) (5672,Tools) (2193,Distributions) (11106,Editors) };
\addplot coordinates { (14320,LaTeX) (1615,Tools) (560,Distributions) (3075,Editors) };
\legend{Topics, Posts}
\end{axis}
\end{tikzpicture}
It gives a nice bar chart:
But the example is incredibly misleading! See what happens when I try to remove the 'editors' category:
\begin{tikzpicture}
\begin{axis}[title = Contributions per category at LaTeX-Community.org,
xbar,
y axis line style = { opacity = 0 },
axis x line = none,
tickwidth = 0pt,
enlarge y limits = 0.2,
enlarge x limits = 0.02,
symbolic y coords = {LaTeX, Tools, Distributions},
nodes near coords,
]
\addplot coordinates { (57727,LaTeX) (5672,Tools) (2193,Distributions) };
\addplot coordinates { (14320,LaTeX) (1615,Tools) (560,Distributions) };
\legend{Topics, Posts}
\end{axis}
\end{tikzpicture}
Clearly something is missing and/or going wrong. How do I properly add or remove categories from this bar chart? Why did it work in the example?