I've just installed MacTeX-2019 on my MacBook. So I'm using TeXShop 4.27 which comes along.

I'm trying to execute the most basic GNUPLOT example: http://www.texample.net/tikz/examples/gnuplot-basics/

Here is the output I get:

enter image description here

What could possibly go wrong?

I've tried other examples that work well. But it looks like there is a specific problem with

\draw plot function

Thanks for your help,


  • 1
    is gnuplot installed? is shell-escape enabled? – Seamus Oct 14 at 12:45
  • @Seamus I don't know: I've just installed MacTeX-2019. How do I check? – Julien Oct 14 at 12:48
  • If you read your own link, you will see the prerequisite. – hpekristiansen Oct 14 at 12:50
  • \documentclass{article} \usepackage{tikz} \begin{document} \pagestyle{empty} \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 ({\x},{\x}) node[right] {$f(x) =x$}; \draw[color=blue] plot ({\x},{sin(deg(\x))}) node[right] {$f(x) = \sin x$}; \draw[color=orange] plot ({\x},{0.05*exp(\x)}) node[right] {$f(x) = \frac{1}{20} \mathrm e^x$}; \end{tikzpicture} \end{document} – Schrödinger's cat Oct 14 at 12:51
  • ^^^ this does the same but without gnuplot. – Schrödinger's cat Oct 14 at 12:51

Juste making @Seamus comment an answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.