# How to graph the following exponential function using Tikz and PGF

I would like to graph the following function, 10000/(9999*e^(-0.125*x)+1) using Tikz and PGFplots but I can not seem to get it to work. I would like labels for the horizontal axis (t) and the vertical axis (I). I want the range of the function to be from 0 to 10,000 so I could see the asymptote being reached over time. However I can't seem to figure out how to make the two axes go up to 10,000 without making the axes itself too big to fit on paper.

I have used this so far, but I would like the tick marks to read 0, 1000, 2000, or something similar, up to 10000. Moreover, I do not want it to use scientific notation for the tick marks. My graph seems not to look like as I want it as well.

\documentclass{amsart}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepackage{mathtools}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\begin{axis}[scaled ticks=false,xlabel=Time, ylabel=Infectious Individuals,xmin=0,ymin=0]
\end{axis}
\end{tikzpicture}
\end{document}


Edit -

I have been able to obtain - But I would like to draw an asymptote at 10000 as well as having the origin of the axis starting at 0,0 not as it is seen. Lastly, how would I go by adding labels for the axes?

• Please provide what ever code you have so far Commented Dec 8, 2015 at 17:03
• @daleif Yes I was attempting to. Commented Dec 8, 2015 at 17:07
• @Frumpy Can you please make a minimal example that demonstrates the problem? Please eliminate all unnecessary code (for instance, you never use any of the macros you define, and you load a lot of packages). This will help us to focus a solution directly onto your problem. Thanks! Commented Dec 8, 2015 at 17:11
• @darthbith I am sorry, I was copying the same code from another post I made, which used it. I have fixed it. Commented Dec 8, 2015 at 17:13
• Try adding the option h! to the figure environment, as in \begin{figure}[h!]. This influences the placement algorithm. See this post for more detail. Commented Dec 8, 2015 at 17:39

I think this does what you are asking. Since you don't say how the asymptote should look like, I've added some arbitrary options.

\documentclass{amsart}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepackage{mathtools}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\begin{axis}[
scaled ticks=false,
xmin=0,
ymin=0,
xlabel=x axis label,
ylabel=y axis label,
]

By the way, is there a reason why you use version 1.8 on \pgfplotsset{compat=1.8}?