3

I want to plot 5x9000+ data points. I am already using:

\usepgfplotslibrary{external} 
\tikzexternalize

and

-shell-escape -enable-write18 

in PDFLatex. However, I still get the memory error. I am reading the data from a file like this:

\pgfplotstableread{C:\\data_1373554136.txt}
\datatable
%\addplot table[x = 0] from \datatable ;
\addplot table[y = 1] from \datatable ;
\addplot table[y = 2] from \datatable ;
\addplot table[y = 3] from \datatable ;
\addplot table[y = 4] from \datatable ;
\addplot table[y = 5] from \datatable ;

My data in the file looks like this:

Time    0   1   2   3   4   5
0   0   0   0   0   0   0
1   0   1   7   19  1   115

I am running on Windows 7 using Miktex.

Any suggestions there?

  • 3
    The external library only helps with memory problems if the individual tikzpicture environments are small enough to compile correctly. In your case, try compiling the document with lualatex instead of pdflatex. – Jake Jul 11 '13 at 15:15
  • @Jake Probably that's the closest we can get to an answer: could you make it one? – Joseph Wright Aug 24 '13 at 15:36
  • @Jake See Joseph's comment. – Torbjørn T. Jan 4 '14 at 22:44
6

It might be late for an answer, but just for documentation.

In my case I found lualatex extremely slow.

Instead one could increase the memory manually for pgfplots externalization. (numbers are chosen arbitrary to be large enough, you may want adjust them)

\tikzexternalize[prefix=tikz,shell escape=-enable-write18]

\tikzset{external/system call= {pdflatex -save-size=80000 
                           -pool-size=10000000 
                           -extra-mem-top=50000000 
                           -extra-mem-bot=10000000 
                           -main-memory=90000000 
                           \tikzexternalcheckshellescape 
                           -halt-on-error 
                           -interaction=batchmode
                           -jobname "\image" "\texsource"}} 

or you can use lualatex only for externalization

\tikzset{external/system call= {lualatex
                           \tikzexternalcheckshellescape 
                           -halt-on-error 
                           -interaction=batchmode
                           -jobname "\image" "\texsource"}} 
  • What kind of pdflatex do you use? I'm on TeXLive2015 and pdflatex does not recognize those options for increasing memory. – Jost Jul 25 '15 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.