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
makedoesn't sayrestricted \write18 enabled. Try adding-enable-write18to the makefile manually and runningmakeagain. – Sašo Živanović Feb 7 at 11:46