PGFplotsのcontourgnuplot呼び出しは、空の.tableファイルになります

Nov 27 2020

私はこの回答から次のコードを再現しようとしています。これは、便宜上@TikZlingによって提案された修正を加えてここに貼り付けています。

\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}

元の回答によると、出力は次のようになります。

経由でコンパイル

$ lualatex --shell-escape contour.tex

この警告が表示されます

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

.tablegnuplotから返されたファイルも同様に空です:

$ cat contour_contourtmp0.table 

# Surface 0 of 1 surfaces

# Curve title: ""contour_contourtmp0.dat""

ArchLinuxでTeXlive2020を使用しているIm$ gnuplotは、コマンドラインで利用できます。

回答

Christoph90 Nov 30 2020 at 12:25

私のシステム~/.gnuplotのホームディレクトリに、を指定したデフォルトの構成ファイルがあったことがわかりましたset datafile separator comma

これにより、からのデータがcontour_contourtmp0.datコンマ区切りとして解釈され、必然的に有効なデータポイントが生成されませんでした。