Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use some huge file to plot and for this I changed the tex conf file to increase memory that works.

But I would like use instead external memory for this I try to use tikzexternal.

But I fail.

MWE

\documentclass[table]{beamer}

\usepackage{etex}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[shell escape=-enable-write18, mode=list and make] %, prefix=figures/
\tikzset{external/force remake}
\usepackage{pgfplots, xstring}
\usepackage{pgfplotstable}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}

\usetheme{CambridgeUS}


\newenvironment{footnotetabular}{\footnotesize\tabular}{\endtabular}
\newenvironment{smalltabular}{\small\tabular}{\endtabular}
\newenvironment{tinytabular}{\tiny\tabular}{\endtabular}


\definecolor{rougeClair}{RGB}{191,0,0}
\definecolor{blanc}{RGB}{255,255,255}
\tikzexternalize[mode=list and make]
\tikzset{
    % Defines a custom style which generates BOTH, .pdf and .png export
    png export/.style={
        external/system call/.add={}%
        {; convert -density 300 -transparent white "\image.pdf" "\image.png"}
    }
}
\pgfplotsset{
  compat        = newest,  % <-- moves axis labels near ticklabels (respects tick label widths)
  table/col sep = comma
}

\hypersetup{ urlcolor=blanc }

\title{blah}


\begin{document}
\pgfplotstableread{f1.txt} \tableA


%\pgfkeys{/pgf/number format/fixed,/pgf/number format/1000 sep = \thinspace}

\begin{frame}
  \titlepage blah
\end{frame}


\begin{frame}
  \frametitle{Plan}
  \tableofcontents
\end{frame}


\begin{frame}
  \frametitle{}
  \begin{tikzpicture}[scale=0.8]
    \centering
    \begin{axis}[
        xlabel                  = X,
        ylabel                  = Y,
        height                  = 10cm,
        width                   = 10cm,
        enlarge x limits        = false,
        xmin                    = 10,
        xmax                    = 80,
        x tick label style      = {font=\footnotesize},
        y tick label style      = {font=\footnotesize}
      ]
      \addplot [only marks, mark size = 0.5,  scatter, scatter src=y] table [ x=X, y=Y ] from \tableA;
    \end{axis}
  \end{tikzpicture}
\end{frame}


\end{document}

Result

$ pdflatex test.tex

$ make -f test.makefile

pdflatex -halt-on-error -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{test}\input{test}"
...
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
make: *** [test-figure0.pdf] Erreur 1

$ tail test-figure0.log
Here is how much of TeX's memory you used:
 25606 strings out of 256216
 576400 string characters out of 1917072
 1500001 words of memory out of 1500000
 28286 multiletter control sequences out of 10000+200000
 8657 words of font info for 32 fonts, out of 1200000 for 2000
 645 hyphenation exceptions out of 8191
 56i,17n,74p,770b,1345s stack positions out of 5000i,500n,6000p,200000b,15000s

Whith document class

same result

\documentclass{article}

\usepackage{etex}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[shell escape=-enable-write18, mode=list and make] %, prefix=figures/
\tikzset{external/force remake}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\usepackage{pgfplotstable}
\usepackage{xcolor}
\usepackage[utf8]{inputenc}


\tikzexternalize[mode=list and make]
\tikzset{
    % Defines a custom style which generates BOTH, .pdf and .png export
    png export/.style={
        external/system call/.add={}%
        {; convert -density 300 -transparent white "\image.pdf" "\image.png"}
    }
}
\pgfplotsset{
  compat        = newest,  % <-- moves axis labels near ticklabels (respects tick label widths)
  table/col sep = comma
}


\begin{document}
\pgfplotstableread{f1.txt} \tableA

  \begin{tikzpicture}[scale=0.8]
    \centering
    \begin{axis}[
        xlabel                  = X,
        ylabel                  = Y,
        height                  = 10cm,
        width                   = 10cm,
        enlarge x limits        = false,
        xmin                    = 10,
        xmax                    = 80,
        x tick label style      = {font=\footnotesize},
        y tick label style      = {font=\footnotesize}
      ]
      \addplot [only marks, mark size = 0.5,  scatter, scatter src=y] table [ x=X, y=Y ] from \tableA;
    \end{axis}
  \end{tikzpicture}

\end{document}

Edit: same error with 10 lines from the huge file

Input file

file: f1.txt

i,X,Y
214,55.44,10.4825
3879,66.29,9.2017
215,65.71,340.529
3971,45.59,351.606
3970,44.16,342.988
3973,61.64,13.2072
3972,64.92,8.65114
3975,59.09,7.90864
2264,40.32,406.593
share|improve this question

closed as too localized by Stefan Kottwitz Feb 12 '13 at 23:36

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
As such, it isn't really a minimal example. You should try and identify what is necessary to reproduce the problem: for example, does it work without beamer? Also, you mention that the data file is quite big, but you didn't provide it. Can you test with a smaller (dummy) data file and see if the problem persist? –  T. Verron Feb 7 '13 at 10:38
    
Thanks for your help. Same error with a smaller files and with article document class. The second example should be tiny than previous –  bioinfornatics Feb 7 '13 at 10:53
    
Can you post the small data file? –  Sašo Živanović Feb 7 '13 at 10:55
    
yes, that is done –  bioinfornatics Feb 7 '13 at 11:00
1  
I have noticed that the output of your make doesn't say restricted \write18 enabled. Try adding -enable-write18 to the makefile manually and running make again. –  Sašo Živanović Feb 7 '13 at 11:46