[Tex/LaTex] Bar from bar chart without value

bar charttikz-pgf

I would like to add a single bar to my chart, but without any value. Unfortunately when I skip adding proper value with label x in coordinates, it (bar with label x) disappears from chart.

\begin{tikzpicture}
\begin{axis}[
   width=\textwidth,
   ybar,
   enlargelimits=0.10,
   legend style={at={(0.5,-0.2)},
   anchor=north,legend columns=-1},
   symbolic x coords={A,B,C},
   xtick=data,
   nodes near coords,
   nodes near coords align={vertical},
   x tick label style={rotate=45,anchor=east},
   ]
  \addplot coordinates {(B,5) (C,7)};
\end{axis}
\end{tikzpicture}

In this example bar A (and label A) will not appear on the chart. Anybody knows how to put this x label to chart?

Best Answer

Here is a suggestion using

   symbolic x coords={A,B,C},
   xtick={A,B,C},
   xmin=A,
   ymin=0,
   enlarge y limits={0.1,upper},

enter image description here

Code:

\documentclass[margin=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
   width=\textwidth,
   ybar,
   enlargelimits=0.10,
   legend style={at={(0.5,-0.2)},
   anchor=north,legend columns=-1},
   symbolic x coords={A,B,C},
   xtick={A,B,C},
   xmin=A,
   ymin=0,
   enlarge y limits={0.1,upper},
   nodes near coords,
   nodes near coords align={vertical},
   x tick label style={rotate=45,anchor=east},
   ]
  \addplot coordinates {(B,5) (C,7)};
\end{axis}
\end{tikzpicture}
\end{document} 
Related Question