# How to single label a point in pgfplots with text?

This seems like it should be straightforward but I'm new to using pgfplots. I have been using this awesome box plot code and would like to be able to add a single point

How can I make:

\addplot[color = black, mark = *, nodes near coords,every node near coord/.style={anchor=180}]coordinates {( 0, -1)};


Label with a text label (say mylabel) rather than the value (-1) which is displayed?

The total code is (combined with box plotting code):

\begin{filecontents}{testdata.dat}
%x whiskerbottom boxbottom median boxtop whiskertop
0  -0.573413   -0.528268   -0.641948 -0.483655 -0.794368
\end{filecontents}

\begin{tikzpicture}
\begin{axis} [
xtick={0},
xticklabels=test,
box plot width=10mm]

\boxplot [black]{testdata.dat}
%I've modified things to get to this point but cannot seem to figure out how to add a text label to it
\addplot[color = black, mark = *, nodes near coords,every node near coord/.style={anchor=180}]coordinates {( 0, -1)};

\end{axis}
\end{tikzpicture}

-
Could you please expand your code to a full minimal working example (MWE)? Simply adding a documentclass and the tikz and pgfplots package didn't do the trick. – Benedikt Bauer Mar 29 '13 at 22:44

You can set the contents of the nodes by using the optional argument to node near coords=<content>. By default, it's set to \pgfmathprintnumber{\pgfplotspointmeta}, but you can use any text or code. To use the static text mylabel, you'd say nodes near coords=mylabel:
\addplot [black, mark = *, nodes near coords=mylabel,every node near coord/.style={anchor=180}] coordinates {( 0, -1)};