I would like to have \sin x
on top of the y-axis' arrow tip and x
somewhere on the right of the x-axis' arrow tip. How can I achieve that? On top of that, I would like to know how I can tweak the distances myself.
There is 7.4.1 in the manual but using that code does not work out.
MWE (taken from p. 50)
\documentclass{scrartcl}
\usepackage{
pgfplots,
amsmath
}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\pgfplotsset{every axis label/append .style={}}
%\pgfplotsset{every axis x label/append .style={
%at={(0.5,0)},
%right,
%yshift=5pt}}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
minor tick num=2,
axis y line=left,
axis x line=middle,
xlabel=$x$,ylabel=$\sin x$
]
\addplot[blue,mark=none]
plot[domain=-5:5,samples=40]
(\x,{sin(\x r)});
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}