I have a problem concerning pgfplots
and large datasets. I have the following minimal example:
\documentclass{scrartcl}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{plot coordinates/math parser=false}
\usetikzlibrary{plotmarks}
\usepgfplotslibrary{external}
\tikzexternalize
\begin{document}
%\tikzset{external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
\tikzset{external/remake next}
\input{lw05.tikz}
\tikzset{external/remake next}
\input{lw01.tikz}
\tikzset{external/remake next}
\input{lw005.tikz}
\end{document}
The three files lwXX.tikz
can be found here (also the .tex
-file and the result).
Since I know there are problems concerning the memory in LaTeX, I use the externalization option and the parameter -buf-size=5000000
while compiling the file (I also tried to compile the figures using LuaLaTeX which can be done by uncommenting the comment, but the output did not change)
My problem now is, there are unwanted spikes in the output. I illustrated it in a picture, which can be seen here
here http://www.uni-ulm.de/~pqa62/pgfplots_large_dataset/illustration.png.
The three figures are plotted using different line widths in the TikZ file. If you zoom in in the .pdf
-file you will see what I mean. Also in the second pictures some spikes will then appear.
Does anybody know, where these errors come from and how to avoid them? I can hardly reduce the size of the dataset, since the underlying data is a sinusoidal function multiplied with some other function and one period of the sinusoidal is already only made up of approximately 14 datapoints. I don't want to reduce this number any further.
diff
on the threetikz
files, the differences between the files are only in the values of theline width
parameters. Is this as it should be?