Seite 1 von 1

[TikZ] Buffer Fehlermeldung bei Octave-Plot

Verfasst: Sa 30. Mär 2013, 16:09
von Shaint
Hallo Community,
ich versuche mittels des Octave-Script "matlab2tikz" einen Octave Plot zu exportieren. Das klappt auch meistens ganz gut. Doch bekomme ich jetzt die Fehlermeldungen:
pdflatex: Not enough room in an internal buffer.
und
! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e
rror -interaction=batchmode -jobname "LaTeX1-figure0" "\def\tikzexternalrealjob
{LaTeX1}\input{LaTeX1}"' did NOT result in a usable output file 'LaTeX1-figure0
' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled
system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is a
lso named 'write 18' or something like that. Or maybe the command simply failed
? Error messages can be found in 'LaTeX1-figure0.log'. If you continue now, I'l
l try to typeset the picture.
Es ist ein relative kleiner Plot und sollte daher eigentlich den Buffer nicht überfordern.
Die Tex-Datei des Plots sieht folgendermasen aus:
\definecolor{mycolor1}{rgb}{0,1,1}

\begin{tikzpicture}

\begin{axis}[%
width=6.02629419968824in,
height=4.30033021576831in,
scale only axis,
xmin=5, xmax=8.5,
xlabel={GHz},
xmajorgrids,
ymin=0, ymax=120,
ylabel={$\alpha\text{ / }\beta$},
ymajorgrids,
title={Ausbreitungskonstante},
legend style={draw=black,fill=white,nodes=left,legend plot pos=right}
]
\addplot [
color=blue,
solid,
mark=x,
mark options={solid}
]
table{
5 119.802213449661
5.25 114.77311190157
5.5 109.249178475279
5.75 103.150777091636
6 96.3687181599865
6.25 88.7461844252326
6.5 80.0431644552501
6.75 69.8566793469055
7 57.4019385272975
7.25 40.6440835852314
7.5 0.000997362779939685
7.75 0.000161957855096683
8 0.000112745333811544
8.25 9.03387481780598e-005
8.5 7.67897116077436e-005
};
\addlegendentry{\alpha Simulation};

\addplot [
color=red,
dashed,
mark=x,
mark options={solid}
]
table{
5 7.54931062960186e-005
5.25 7.60220021976759e-005
5.5 7.72619478747119e-005
5.75 7.93630071212058e-005
6 8.25810145572978e-005
6.25 8.7364965033432e-005
6.5 9.45608077667389e-005
6.75 0.000105973050451991
7 0.000126360202226536
7.25 0.000175141959984342
7.5 7.01548387387496
7.75 42.5269918868287
8 60.217081571748
8.25 74.1749923062496
8.5 86.2328368880652
};
\addlegendentry{\beta Simulation};

\addplot [
color=mycolor1,
solid,
mark=o,
mark options={solid}
]
table{
5 0
5.25 0
5.5 0
5.75 0
6 0
6.25 0
6.5 0
6.75 0
7 0
7.25 0
7.5 5.84591737878713
7.75 41.3381261457232
8 58.637988334614
8.25 72.2695908254048
8.5 84.0373781103566
};
\addlegendentry{\alpha analytische Berechnung};

\addplot [
color=green,
dashed,
mark=o,
mark options={solid}
]
table{
5 117.01536272056
5.25 112.102631476202
5.5 106.707533828233
5.75 100.752610328801
6 94.1316743768041
6.25 86.692264213386
6.5 78.2011390483278
6.75 68.2669798879207
7 56.12874360013
7.25 39.8193934382482
7.5 0
7.75 0
8 0
8.25 0
8.5 0
};
\addlegendentry{\beta analytische Berechnung};

\end{axis}
\end{tikzpicture}%
Ein Minimalbeispiel in dem ich den Plot aufrufe sieht so aus:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
% recommended as of Pgfplots 1.3:
\pgfplotsset{compat=newest}
\usepgfplotslibrary{external} 
\tikzexternalize
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{figure}[ht]
  \centering
	\input{GammaPlot}
	
\end{figure}
\end{document}
Dieses Einbinden hat bereits erfolgreich bei anderen Plots die durch matlab2tikz entstanden sind funktioniert.

Ich hoffe ihr könnt mir helfen.

Mit freundlichen Grüßen
Shaint

Verfasst: Sa 30. Mär 2013, 18:37
von Epllus
Soweit ich mich erinnere, lag der Fehler an vergessenen $$ Symbolen.
Hat mich lang genug gekostet um da draufzukommen.
\RequirePackage{filecontents}
\begin{filecontents}{GammaPlot.tex}

\begin{tikzpicture} 

\begin{axis}[% 
width=6.02629419968824in, 
height=4.30033021576831in, 
scale only axis, 
xmin=5, xmax=8.5, 
xlabel={GHz}, 
xmajorgrids, 
ymin=0, ymax=120, 
ylabel={$\alpha\text{ / }\beta$}, 
ymajorgrids, 
title={Ausbreitungskonstante}, 
legend style={draw=black,fill=white,nodes=left,legend plot pos=right} 
] 
\addplot [ 
color=blue, 
solid, 
mark=x, 
mark options={solid} 
] 
table{ 
5 119.802213449661 
5.25 114.77311190157 
5.5 109.249178475279 
5.75 103.150777091636 
6 96.3687181599865 
6.25 88.7461844252326 
6.5 80.0431644552501 
6.75 69.8566793469055 
7 57.4019385272975 
7.25 40.6440835852314 
7.5 0.000997362779939685 
7.75 0.000161957855096683 
8 0.000112745333811544 
8.25 9.03387481780598e-005 
8.5 7.67897116077436e-005 
}; 
\addlegendentry{$\alpha$ Simulation}; 

\addplot [ 
color=red, 
dashed, 
mark=x, 
mark options={solid} 
] 
table{ 
5 7.54931062960186e-005 
5.25 7.60220021976759e-005 
5.5 7.72619478747119e-005 
5.75 7.93630071212058e-005 
6 8.25810145572978e-005 
6.25 8.7364965033432e-005 
6.5 9.45608077667389e-005 
6.75 0.000105973050451991 
7 0.000126360202226536 
7.25 0.000175141959984342 
7.5 7.01548387387496 
7.75 42.5269918868287 
8 60.217081571748 
8.25 74.1749923062496 
8.5 86.2328368880652 
}; 
\addlegendentry{$\beta$ Simulation}; 

\addplot [ 
color=mycolor1, 
solid, 
mark=o, 
mark options={solid} 
] 
table{ 
5 0 
5.25 0 
5.5 0 
5.75 0 
6 0 
6.25 0 
6.5 0 
6.75 0 
7 0 
7.25 0 
7.5 5.84591737878713 
7.75 41.3381261457232 
8 58.637988334614 
8.25 72.2695908254048 
8.5 84.0373781103566 
}; 
\addlegendentry{$\alpha$ analytische Berechnung}; 

\addplot [ 
color=green, 
dashed, 
mark=o, 
mark options={solid} 
] 
table{ 
5 117.01536272056 
5.25 112.102631476202 
5.5 106.707533828233 
5.75 100.752610328801 
6 94.1316743768041 
6.25 86.692264213386 
6.5 78.2011390483278 
6.75 68.2669798879207 
7 56.12874360013 
7.25 39.8193934382482 
7.5 0 
7.75 0 
8 0 
8.25 0 
8.5 0 
}; 
\addlegendentry{$\beta$ analytische Berechnung}; 

\end{axis} 
\end{tikzpicture}%

\end{filecontents}

\documentclass{article} 
\usepackage{tikz} 
\usepackage{pgfplots,amsmath} 
% recommended as of Pgfplots 1.3: 
%\pgfplotsset{compat=1.3} 
\usepgfplotslibrary{external} 
\tikzexternalize 
\usetikzlibrary{calc} 
\usetikzlibrary{decorations.pathreplacing} 
\definecolor{mycolor1}{rgb}{0,1,1} 
\begin{document} 
\begin{figure}[ht] 
  \centering 
   \input{GammaPlot.tex} 
\end{figure} 


\end{document}



Wenn du pdflatex -shell-escape laufen lässt, meldet er einen Fehler, wenn du den ignorierst, wird das Bild hoffentlich so gedruckt wie es sein soll.

Evtl. findet jemand den Grund für den Fehler.

Grüße
Epllus

Verfasst: Mo 1. Apr 2013, 16:41
von Shaint
Editieren
Vielen Dank, für die Dateien hat es funktioniert. Es lag wirklich an den $$ Zeichen.
Mit einem sehr großen Plot hatte ich nochmal das gleiche Problem. Da lag es aber nicht an den $$ Zeichen.

Wenn man Plots mit vielen Punkten aus Octave/Matlab exportiert mit 'matlab2tikz' bekommt man oft die Fehlermeldung:
pdflatex: Not enough room in an internal buffer.
Möchte man trotzdem einen Plot gelingt das mit folgender Anleitung
1. Open a command line window.
2. At the DOS prompt, enter
initexmf --edit-config-file=latex
3. Type
main_memory=10000000
into the editor window that opens, save the file and quit the editor.
4. To rebuild the format, enter
initexmf --dump=latex
5. Repeat steps 2–4 with config files ‘pdflatex’ and ‘xelatex

Quelle: http://www.latex-community.org/forum/vi ... f=9&t=1872
Ich kann überhaupt nicht garantieren, dass das ein sinnvolles Vorgehen ist! Macht das bitte nur auf eigene Verantwortung. Ich habe keine Ahnung was ich damit gemacht habe :oops: !(Ich habe den main memory erhöht, das ist mir schon klar, aber ich weis nicht ob es weitreichendere Konsequenzen hat)