Here there is my problem with the externalising for tiki package with PdfLaTeX. I am not so new to LaTex, nevertheless I have never used the externalisation for the figures. I use texstudio on a mac (OS X El Capitan). I am writing a very long document and I am trying to plot some experimental data using the tikz package. The data is contained into external sources because of the large amount of numbers. I try to plot more than one curve (scatter data) within the same graph because I want to compare all the curves (10 curves). If I plot at maximum 3 curves I have no problem, but when I compile with more than 3 curves I get errors because of the maximum capacity exceeded. Therefore I use the externalisation by means of the strings in the preamble:
\usepgfplotslibrary[external]
\tikzexternalize[prefix=TikzPictures/]
Nevertheless, compiling with this strings I get this error:
!Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "TikzPictures/filename-figure4""\def\tikzexternalrealjob{filename}\input{filename}"' did NOT result in a usable output file 'TikzPictures/filename-figure4' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex-shell-escape'
I did add the "-shell-escape" string into the command line of PdfLaTeX, here the string: /Library/TeX/texbin/pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
In the following there is part of my code:
\documentclass[11pt,twoside,greek]{report}
...
\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma,compat=newest}
...
\usepgfplotslibrary[external]
\tikzexternalize[prefix=TikzPictures/]
...
\begin{document}
...
\begin{tikzpicture}
\footnotesize
\centering
\begin{axis}[
xlabel = {$x$},
ylabel = {$y$},
grid = major,
legend entries={a,b,c,d,e,f,g,h,i},
]
\addplot[blue] table{data_set/a.txt};
\addplot[red] table{data_set/b.txt};
\addplot[green] table{data_Set/c.txt};
\addplot[yellow] table{data_Set/d.txt};
\addplot[orange] table{data_Set/e.txt};
\addplot[brown] table{data_Set/f.txt};
\addplot[black] table{data_Set/g.txt};
\addplot[ciano] table{data_Set/h.txt};
\addplot[purple] table{data_Set/i.txt}
\end{axis}
\end{tikzpicture}
...
\end{document}
I compile using PdfLaTeX. This is the log outcome:
! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e rror -interaction=batchmode -jobname "TikzPictures/filename-figure4" "\def\tikz externalrealjob{filename}\input{filename}"' did NOT result in a usable output f ile 'TikzPictures/filename-figure4' (expected one of .pdf:.jpg:.jpeg:.png:). Pl ease verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'TikzPicture s/filename-figure4.log'. If you continue now, I'll try to typeset the picture.
UPDATE: it seems to be a problem with some specific 'txt' files. In my case I get the error when I use
\addplot[red] table{data_set/N12-C05-1.txt}
\addplot[blue] table{data_set/N12-C05-2.txt}.
In the other cases, for example
\addplot[red] table{data_set/N12-C02-1.txt}
\addplot[red] table{data_set/N12-C10-2.txt})
I have no error!!! Hence I tried to change the filename but the error persists. I tried to change the data within the file N12-C05-1.txt and N12-C05-2.txt but the error still persists. It sounds really weird!
prefix=test-
to see if that works, it should then make the files in the same folder as the.tex
(untested)