0

I am trying to produce multiple plots in one axis but always get error. It is interesting that file builds fine with both plots separately.

Min code that does not working:

\documentclass{article}

\usepackage{pgfplots} \usepackage{pgfplotstable}

\usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture} \begin{axis} \addplot [no markers] gnuplot [raw gnuplot, color=red, id=xrd_H2] { set datafile separator comma; plot "Data/XRD/difrey/I74-3H2_norm.csv" every ::1 using 1:2}; \addplot [no markers] gnuplot [raw gnuplot, color=blue, id=xrd_noH2] { set datafile separator comma; plot "Data/XRD/difrey/I74-3_norm.csv" every ::1 using 1:2}; \end{axis} \end{tikzpicture} \end{document}

Result:

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

===== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o n-error -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjo b{test}\input{test}"' ========

! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e rror -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{t est}\input{test}"' did NOT result in a usable output file 'test-figure0' (expec ted one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system c alls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also name d 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'test-figure0.log'. If you continue now, I'll try to t ypeset the picture.

See the tikz package documentation for explanation. Type H <return> for immediate help. ...

l.21 \end{tikzpicture}

? ! Emergency stop. ...

l.21 \end{tikzpicture}

! ==> Fatal error occurred, no output PDF file produced! Transcript written on /home/volk/Documents/Work/CuZn_h-BN/test.log.

Min code that working:

\documentclass{article}

\usepackage{pgfplots} \usepackage{pgfplotstable}

\usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture} \begin{axis} \addplot [no markers] gnuplot [raw gnuplot, color=red, id=xrd_H2] { plot "Data/XRD/difrey/I74-3H2.dat" every ::1 using 1:2}; \addplot [no markers] gnuplot [raw gnuplot, color=blue, id=xrd_noH2] { plot "Data/XRD/difrey/I74-3.dat" every ::1 using 1:2}; \end{axis} \end{tikzpicture} \end{document}

Expect graph with 2 plots from 0 to 1.

Also the code that working:

\documentclass{article}

\usepackage{pgfplots} \usepackage{pgfplotstable}

\usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture} \begin{axis} \addplot [no markers] gnuplot [raw gnuplot, color=red, id=xrd_H2] { set datafile separator comma; plot "Data/XRD/difrey/I74-3H2_norm.csv" every ::1 using 1:2}; \end{axis} \end{tikzpicture} \end{document}

Files:

I74-3.dat I74-3H2.dat I74-3_norm.csv I74-3H2_norm.csv

Is it the bug or I'am doing something wrong?

  • 1
    For me this works perfectly fine (with commented \tikzexternalize; didn't test with). Unfortunately you didn't let us know what you consider "not working", i.e. state an error message or false output. – Stefan Pinnow Dec 01 '21 at 18:49
  • @StefanPinnow . Added log. Without \tikzexternalize pdflatex has out of memory error. – Ilia Volkov Dec 02 '21 at 09:41

0 Answers0