Good morning, I have a problem using pgfplots. I tried to draw the function y=arctan(1/x), but I obtain an inexact result. Where is the problem? The code is:
\documentclass{article}
\usepackage{pgfplots,relsize}
\begin{document}
\begin{tikzpicture}
\begin{axis} [
width=12cm,height=6cm,
axis lines=middle,
enlargelimits,
xtick={-5,5},ytick={-1.57,1.57},
xticklabels={$-5$, $5$},
yticklabels={$-\pi/2$, $\pi/2$},
xlabel=$x$,ylabel=$y$]
\addplot [domain=-10:10,
samples=200,smooth,thick,blue]
{rad(atan(1/x))};
\end{axis}
\end{tikzpicture}
\end{document}
\begin{axis}[trig format plots=rad]