0

I tried to plot the contour of a xyz matrix using pgfplots contour gnuplot, but got the error message from the .log data (My data is in the test pic.tex file)

Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set (\pgfplotsset{compat=1.17}).

\openout3 = `"test pic_contourtmp0.dat"'.

PGFPlots: reading {./data/fluo/test1.txt}
\openout3 = `"test pic_contourtmp0.script"'.

runsystem(gnuplot ""test pic"_contourtmp0.script")...executed.


! Package pgfplots Error: sorry, plot file{"test pic"_contourtmp0.table} could not be opened.

The examples provided from here are working fine, so the problem should not come from the gnuplot implementation into pdflatex. Here, I already added the commands -enable-write18 and -shell-escape and gnuplot is also in the recommended path.

![enter image description here

I assume there is a problem with my data, so maybe someone else can try my data (from here) and can enlight me.

I am running latex with MikTex Console 4.1, TeXstudio 3.0.4 and gnuplot has version 5.4.1 using Windows 10.

My MWE looks like this:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
    \begin{tikzpicture}
        \begin{axis}[
            view={0}{90},
            ]
            \addplot3[
            contour gnuplot={labels=false},
            mesh/rows=3, mesh/cols=281, mesh/check=false
            ]
            table[
            x index=0,
            y index=1,
            z index=2,
            ] {./data/fluo/test1.txt};
        \end{axis}
    \end{tikzpicture}
\end{document}

Edit: I tried it out of curiosity in an unsaved .tex-file and it worked. Then I saved this file and the same error occured.

2
  • I also retried the examples from here in a saved .tex file and the same error (Package pgfplots Error: sorry, plot file{"test pic 3"_contourtmp0.table} could not be opened.) showed up. The test pic 3_contourtmp0.dat and test pic 3_contourtmp0.script files are generated.
    – Excelsior
    Commented Feb 18, 2021 at 14:15
  • I found the solution: It was not te data, it was the name of the .tex file which caused the error. I renamed it (without space) and now it works as expected.
    – Excelsior
    Commented Feb 19, 2021 at 16:38

1 Answer 1

0

I found the solution: It was not te data, it was the name of the .tex file which caused the error. I renamed it (test pic 3.tex -> testpic3.tex) and now it works as expected.

You must log in to answer this question.

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