I have been using Texpad (1.7.23) for quite some time now on a Mac without any problems. Recently I decided to try to draw my graphs on TikZ instead of drawing them somewhere else and importing them. So I followed these steps:
- I installed gnuplot (5.0.3) running
brew install gnuploton terminal; - Tried to draw a simple function on terminal using gnuplot, worked fine;
- On Texpad preferences, I allowed packages to use the
--shell-escapedirective.
The thing is when I try to run the example from the TikZ and PGF Manual:
\begin{tikzpicture}[domain=0:4]
\draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red] plot[id=x] function{x} node[right] {$f(x) =x$};
\draw[color=blue] plot[id=sin] function{sin(x)} node[right] {$f(x) = \sin x$};
\draw[color=orange] plot[id=exp] function{0.05*exp(x)} node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
\end{tikzpicture}
I always get the error message:
Package pgf Warning: Plot data file `example.x.table' not found. on input line 40.
I have tried reinstalling gnuplot compiling from source with readline library, still get the same error message with and empty graph on the pdf.
Please enlighten me on what I might be doing wrong.

latexmk --shell-escape -pdf example.tex? – Benjamin Mar 03 '16 at 20:25