Dein Code läuft mit oder ohne use comma fehlerfrei durch, zeigt das Problem also nicht. Ich habe deshalb jetzt einfach mal aus der 40 eine 40.2 gemacht.
Ändere nodes near coords wie im folgenden Beispiel:
Code:
\documentclass[margin=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\pgfplotsset{/pgf/number format/use comma}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar stacked,% configures `bar shift
x tick label style={/pgf/number format/1000 sep=},
%ylabel=Population,
enlarge x limits=0.15,
enlarge y limits={.15,upper},
ymin=0,
%legend style={at={(0.5,-0.15)},anchor=north,legend columns=-1},
bar width=9pt,
nodes near coords={%
\pgfmathprintnumberto[fixed,assume math mode=true,use period]{\pgfplotspointmeta}{\myval}%
\pgfmathparse{\myval<5?:"\noexpand\pgfmathprintnumber[use comma]{\myval}"}\pgfmathresult%
},
]
\addplot coordinates {(1930,50) (1940,33) (1950,40.2) (1960,50) (1970,70)};
\addplot coordinates {(1930,02) (1940,42) (1950,43) (1960,45) (1970,65)};
\addplot coordinates {(1930,15) (1940,15) (1950,15) (1960,15) (1970,15)};
%\legend{Far,Near,Zero}
\end{axis}
% genutzte Version anzeigen
\node[anchor=south east,orange]at(current axis.outer north east){pgfplots Version \pgfplotsversion};
\end{tikzpicture}
\end{document}
Gruß
Elke
Lesezeichen