# Stacked bar chart overlapping values [duplicate]

How can I overcome the issue I'm having with the chart below:

\begin{figure}[h!]
\centering
\caption{\label{tab:kdd99chartProt}Attack representation per protocol within     KDD99 10\% dataset}
\begin{tikzpicture}
\begin{axis}[
ybar stacked, ymin=0,
bar shift=0pt,
ymajorgrids,
bar width=30pt,
ylabel=Representation in \%,
width=250pt,
symbolic x coords={TCP,UDP,ICMP},
legend pos=outer north east,
xtick=data,
ymax=85,
nodes near coords={\pgfmathprintnumber\pgfplotspointmeta \%}
]

({TCP},23)
({UDP},0.2)
({ICMP},57)};


• @user2459813 Well, that's going to be a tough one. You are comparing 0.2% with 57%, and also 4% with 0.2% in a 0-80% scale. No wonder the numbers will overlap. As far as I can see you either tweak with nodes near coords style and make the font smaller, put the nodes to the left and give them some shifting or place the nodes manually. I think the second option is the best one (you don't have many data points). – Guilherme Zanotelli Dec 7 '16 at 15:24