I would like to plot some data in a bar chat using ybar. The data corresponds to years on the x-axis. Now, for some years I have three data values to plot and for others only one value. The problem is when I use ybar, the space between the sets of data is not uniform. How can I make the spacing uniform such that the space between the data sets is uniform? Here's my MWE:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
%small,
ybar,%=8pt, % configures ‘bar shift’
% ybar interval=0.05,
enlargelimits=0.25,
% enlarge x limits={abs=1cm}, % The distance between the center of the first bar and the left edge
ylabel={PMU Count},
symbolic x coords={2009, 2013, 2014, 2015},
xtick=\empty,
%tick label style={font=\footnotesize},
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
nodes near coords,
every node near coord/.append style={font=\tiny},
nodes near coords align={vertical},
ymode=log,
point meta=rawy,
extra x ticks={2009, 2013, 2014, 2015},
extra x tick labels={\kern-12mm 2009,\kern-4mm 2013,\kern-12mm 2014,\kern8mm 2015},
every x tick/.style={white},
% x=2cm,% Distance between the centers of the bars
]
\addplot coordinates {(2009, 200) (2014, 1700)};
\addplot[fill=green] coordinates {(2013, 60)};
\addplot[fill=gray!50] coordinates {(2015, 30)};
\addplot[fill=red!80] coordinates {(2015, 2400)};
\legend{N,I,B,C}
\end{axis}
\end{tikzpicture}
\end{document}
{2009,2013,2014,2015}
are not uniformly distributed, so why should they be?