# Labeling the axes of my plot

I would like to add a label to the axes of my plot. This is my code:

    \begin{figure}[!h]
\centering
\begin{tikzpicture}[scale=1]
\begin{axis}[%
% Lengend position
legend pos = outer north east,
% We need a tick for every data
xtick = data,
% The ticks label are provided in the file as the column named Num
xticklabels from table = {test.dat}{Num}]
% How the data are separated.
% \pgfplotstableset{col sep = tab}
% We need to simulate an x coord since it is litteral in the data file. I choose to index on the line.
\addplot table [x expr = \lineno, y = Min] {test.dat};
\addplot table [x expr = \lineno, y = Moy] {test.dat};
\addplot table [x expr = \lineno, y = Max] {test.dat};
\end{axis}

\end{tikzpicture}
\caption{Propagation d'une publication générée avec la politique est \bf {Amis Seulement}}
\end{figure}

-
The keys for adding labels to the axes are xlabel and ylabel. It's not too hard to find this in the manual. – Jake May 10 '12 at 11:38
The tag is pgfplots – Alain Matthes May 10 '12 at 11:45

1. use xlabel and ylabel in the options part of the axis environment
2. use \node at (axis cs:xmax,0) {your_x_label_here} and \node at (axis cs:0,ymax) {your_y_label_here}
Your second approach only works if you set clip=false or use the \node command in the after end axis/.code={...}. A better way might be to use xlabel to set the label, and adjust the position using xlabel style={at=(current axis.right of origin)} or xlabel style={at=(axis cs:<x>,<y>)} – Jake May 11 '12 at 10:07