PGFplots contour gnuplot 호출 결과 빈 .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.

.table의 gnuplot에서 반환 된 파일은 마찬가지로 비어 있습니다 :

$ cat contour_contourtmp0.table 

# Surface 0 of 1 surfaces

# Curve title: ""contour_contourtmp0.dat""

Arch Linux에서 TeXlive 2020을 사용하는 Im $ gnuplot은 명령 줄에서 사용할 수 있습니다.

답변

Christoph90 Nov 30 2020 at 12:25

내 시스템 ~/.gnuplot의 홈 디렉토리에 set datafile separator comma.

이로 인해의 데이터가 contour_contourtmp0.dat쉼표로 구분 된 것으로 해석되어 필연적으로 유효한 데이터 포인트가 생성되지 않았습니다.