I'm trying to add text to my diagram. I tried it with \node, but it doesn't work.
What I exactly want to do is, to add concrete numbers of Personalstärke at each coordinate in the diagram.
This is how my diagram looks like:
\begin{figure}[h!]
\centering
\begin{tikzpicture}
\pgfplotsset{width=12cm,compat=1.9}
\begin{axis}[
title={},
axis lines = left,
xlabel={Jahr},
x tick label style={/pgf/number format/.cd,%
scaled y ticks = false,
set thousands separator={},
fixed},
ylabel={Personalstärke},
y tick label style={/pgf/number format/.cd,%
scaled y ticks = false,
set thousands separator={.},
fixed},
xmin=2008, xmax=2018,
ymin=12000, ymax=13200,
xtick={0, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018},
ytick={0, 12200, 12400, 12600, 12800, 13000, 13200},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=blue,
mark=circle,
]
coordinates {
(2009,12288)(2010,12433)(2011,12522)(2012,12526)(2013,12416)(2014,12782)(2015,12758)(2016,12813)(2017,12920)(2018,13087)
};
\end{axis}
\end{tikzpicture}
\caption[Personalentwicklung{Personalentwicklung}
\label{fig:Personalstarke}
\end{figure}
Can someone help me please?
at (axis cs: 2009,12288)will place the text at the first point, but you need to be inside the axis environment and it helps to offset the text using [above] or [left] etc. – John Kormylo Aug 05 '20 at 14:03nodes near coordsis for, so try\addplot[nodes near coords, .... – Torbjørn T. Aug 05 '20 at 14:18nodes near coords style={red, font=\tiny}. I don't understand exactly what you mean by "set thousandpoint". Here is a method for setting the position of the labels on a per-point basis: https://tex.stackexchange.com/a/47692/ – Torbjørn T. Aug 05 '20 at 15:16