6

I'm reproducing the following example from pgfplots manual.

\begin{tikzpicture}
\begin{axis}[view={0}{90}]
\addplot3[contour gnuplot]
{x*y};
\end{axis}
\end{tikzpicture}

But this code produces the following error:

Package pgfplots Error: sorry, plot file{Example_contourtmp0.table} could not be opened.

I would highly appreciate if you point me what I'm missing. Thanks

P.S. I'm using MikTex 2.9 on Windows 7.

Edit

Following @hpesoj626 guidelines, I got the following error message.

enter image description here

13
  • 5
    You need to have gnuplot installed, and you need to have write18 enabled in order to be able to call gnuplot from within LaTeX. Could you check whether there's a line like runsystem(gnuplot "texse2_contourtmp0.script")...executed. in your .log file?
    – Jake
    Commented Jan 2, 2013 at 14:42
  • Thanks @jake for showing interest in my problem. Is there any specific way to install gnuplot? I'd highly appreciate if you provide some guidelines to install gnuplot. Thanks
    – MYaseen208
    Commented Jan 2, 2013 at 14:47
  • 1
    I assume since you have posted the bounty that this is still unsolved. Please clarify what progress you have made since asking the question and what troubles you are still having? You have installed gnuplot, compiled with --enable-write18 and you get the same error? Can you include any other information that might be helpful, for example a complete MWE (beginning with \documentclass and ending in \end{document}), and your log file? To help identify where the problem lies, have you tried compiling it from the command line or only through your editor? Commented Jan 9, 2013 at 18:13
  • 1
    Thanks @YiannisLazarides for your comment. Even though I set the path but it was not working due to an extra space. After removing the extra space, now it works. Thanks all of you for your help and sparing time. Much appreciate.
    – MYaseen208
    Commented Jan 10, 2013 at 19:20
  • 1
    @MYaseen208 OK I will provide a bit of a longer answer tomorrow so that we can leave a reference for anyone looking for a similar problem in the future.
    – yannisl
    Commented Jan 10, 2013 at 19:24

1 Answer 1

7
+50

You need to ensure that the path is set correctly. One of the most common frustrations with Windows is the tiny text box used for setting up paths. For any executable to be found one needs to set the "path." Different versions of Windows have slightly different ways to navigate to the input screen, so is best to rather click on "control panel" and search.

An easy way to see, if a path was set-up correctly is to fire up a command prompt console and to type path:

enter image description here

As you can see, easy is an understatement, as is all cluttered under anything close to defaults. If you right click at the top left of the console you can set your console to something larger. You can also adjust some colours if you wish. Good inspiration for color schemes can be found at the sublime2 editor.

A good standalone "Gnuplot" comes bundled with Octave and all necessary settings for windows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .