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>)}
–
JakeMay 11 '12 at 10:07