I have a plot with a lot of measurement datapoints. I exported this plot from Matlab2tikz.
When I tried to compile, it said that the memory was exceeded. I found this question and it tells me that I can export different tikzpictures to different files. Unfortunately, this didn't help me since I have only 1 tikzpicture causing the problem.
So I actually tried to increase the memory of TeX. I went to /usr/share/texlive/texmf/web2c then in texmf.cnf I changed main_memory = 3000000 to main_memory = 5000000. Then I ran texhash and tried to compile my TeX file again.
My problem is that after I increased the memory limit I got again the same error: ! TeX capacity exceeded, sorry [main memory size=3000000]. However I just changed it to 5000000. I presume that I did something wrong when increasing the memory limit. Did I?
-Edit-
Eventually I just used lualatex. This was due to the fact that I think there is something wrong with my texlive install: it is installed twice on my system for some reason. I think, however, that Heiko Oberdiek's answer is correct and hence marked it as the correct answer.
\addplot graphic? – andrMollo Oct 05 '12 at 10:05lualatex, which doesn't have those memory limitations. – Jake Oct 05 '12 at 10:50! Package pgf Error: Driver file ``pgfsys-luatex.def'' not found.In this case, you can add two lines\RequirePackage{luatex85} \def\pgfsysdriver{pgfsys-pdftex.def}in the preamble and the re-run the code in LuaLaTeX. Exaplaination of the issue is found at https://www.tug.org/pipermail/tex-live/2016-April/038296.html – Khaaba Jun 07 '16 at 15:57