# Tikz picture + function plotting | what once worked, no longer does

For one of my classes, I use a fair number of function plots, which I generate using TikZ, and tikzpicture. Unfortunately, what once compiled fine (probably last fall when I last made significant changes), no longer does. I have gnuplot 4.6 installed, and I believe it is working (although given the problems I'm having, can't be sure).

Here is a MWE:

\documentclass{article}

\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows,matrix,positioning}
\usepackage{pgfplots}

\pagestyle{empty}

\begin{document}

Here is a figure:

\begin{center}
\begin{tikzpicture}[x=0.075cm,y=0.0225cm]

% set up maximum and minimum x- and y-coordinates
\def\xmin{-0.5}
\def\xmax{150}
\def\ymin{-1.8}
\def\ymax{210}

\draw[->,thick] (\xmin,0) -- (\xmax,0) node[right] {time};
\draw[->,thick] (0,\ymin) -- (0,\ymax) node[above] {$N$};

% tick marks and tick labels on axes
\foreach \x in {0,20,40,...,140}
\draw[thick] (\x,0pt) -- (\x,-3pt)
node[anchor=north] {\footnotesize\x};
\foreach \y in {0,25,50,...,200}
\draw[thick] (0pt,\y) -- (-3pt,\y)
node[anchor=east] {\footnotesize\y};

% now plot the function
\draw[color=black,thick, smooth,domain=0:148.1] plot[id=sigmoid] function{5.12821*2.71828**(0.1*x)/(1+(5.12821/200)*2.71828**(0.1*x))};

\end{tikzpicture}
\end{center}

\end{document}


When I try to compile this (MikTeX 29, Windows 7), the axes are plotted as they should be, but not the function itself (which is disappointing, since plotting the function is the point of the exercise).

Can someone do a test compile of the MWE at their end? If you can get it to compile, and generate the function plot, then the problem is likely with my gnuplot install. If you can't get it to compile, then something in TikZ has changed that bricks the MWE code.

• Works on my computer without any issues. But did you consider using pgfplots? – percusse Feb 11 '15 at 15:10
• Here is the same exercise \begin{tikzpicture} \begin{axis}[xmin=0.5,xmax=150,ymin=-1.8,ymax=210, xlabel=time,ylabel=$N$,axis lines=middle, width=8cm,height=5cm]\addplot[thick,domain=0:148.1]{5.12821*(2.71828)^(0.1*x)/(1+(5.12821/200)*(2.71828)^(0.1*x))};\end{axis}\end{tikzpicture} – percusse Feb 11 '15 at 15:12
• Works here as well. Distribution: MacTeX (TeX Live 2014), on Mac OS X 8 (Mountain Lion). – Franck Pastor Feb 11 '15 at 15:34