# plotting complicating funtions

Is it possible to plot the function 1/{1+\frac{1}{x}} from 0 to 20 using tikzpicture, when I do it I just get a straight line

\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}

\end{axis}
\end{tikzpicture}
\end{document}

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Feb 2 '15 at 16:04
• Sure it's possible: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[smooth,samples=180,domain=0.0001:20]{1/(1+(1/x))}; \end{axis} \end{tikzpicture} \end{document} The result: i.imgur.com/DWYNRap.png – Gonzalo Medina Feb 2 '15 at 16:44

You are using

{1/{1+{1/x}}}


and you should use

{1/(1+(1/x))}


\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}

• @user28952 which version of pgfplots are you using? – Gonzalo Medina Feb 2 '15 at 17:03