Der PGFplots-Kontur-Gnuplot-Aufruf führt zu einer leeren .table-Datei

Nov 27 2020

Ich versuche, den folgenden Code aus dieser Antwort zu reproduzieren, den ich hier mit den von @TikZling vorgeschlagenen Korrekturen einfüge:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
    \pgfplotsset{compat=newest}
\usepackage{pgfplotstable}
\pgfplotstableset{%
    col sep=semicolon,
    x index=0,
    y index=1,
    header=false
}%

\begin{filecontents}[overwrite]{XYZ.csv}
   2016; 1;       33e-9
   2016; 2;      199e-9
   2016; 3;      966e-9
   2016; 4;      110e-9

   2015; 1;      199e-9
   2015; 2;      966e-9
   2015; 3;      110e-9
   2015; 4;      104e-9

   2014; 1;      199e-9
   2014; 2;      965e-9
   2014; 3;      110e-9
   2014; 4;      104e-9

   2006; 1;     2349e-9
   2006; 2;     6528e-9
   2006; 3;    18405e-9
   2006; 4;    17250e-9

   1993; 1;  1167453e-9
   1993; 2;  2376539e-9
   1993; 3;  2262076e-9
   1993; 4;  2262076e-9
\end{filecontents}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[view = {0}{90}]%
        \addplot3[%
            surf,shader=interp,opacity=0.8
        ] table {XYZ.csv};
        \addplot3[%
            contour gnuplot={
                levels={.0000001,.000001,.00001,.0001,.001,.01,.1},
                draw color=black,
                contour label style={/pgf/number format/std},
            },
        ] table {XYZ.csv};
    \end{axis}
\end{tikzpicture}

\end{document}

Nach der ursprünglichen Antwort sollte die Ausgabe folgendermaßen aussehen:

Kompilieren über

$ lualatex --shell-escape contour.tex

gibt diese Warnung aus

Package pgfplots Warning: the current plot has no coordinates (or all have been
 filtered away) on input line 56.

und die .tablevon gnuplot zurückgegebene Datei ist ebenfalls leer:

$ cat contour_contourtmp0.table 

# Surface 0 of 1 surfaces

# Curve title: ""contour_contourtmp0.dat""

Ich benutze TeXlive 2020 unter Arch Linux, $ gnuplotist in der Kommandozeile verfügbar.

Antworten

Christoph90 Nov 30 2020 at 12:25

Es stellte sich heraus, dass mein System eine Standardkonfigurationsdatei ~/.gnuplotim angegebenen Ausgangsverzeichnis hatte set datafile separator comma.

Dies führte dazu, dass die Daten contour_contourtmp0.datals durch Kommas getrennt interpretiert wurden, was zwangsläufig keine gültigen Datenpunkte ergab.