
나는 작년에 Mac에서 matlab2tikz를 사용해 왔고 완벽하게 작동했습니다. 이제 우분투에서 사용하고 있는데 몇 가지 문제가 발생합니다. 참고로 pgf 2.1을 포함하는 texlive-full을 설치하고 내 서문에 \usepackage{tikz} 및 \usepackage{pgfplots}를 추가했습니다. KILE에서 라텍스 문서(비머 클래스)를 컴파일할 때 다음과 같은 오류 메시지가 나타납니다:
`(./TIKZTest.tikz
! Missing \endcsname inserted.
<to be read again>
\def
l.25 };
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.25 };
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.25 };
! Missing control sequence inserted.
<inserted text>
\inaccessible
l.25 };
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.25 };
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.25 };
! Undefined control sequence.
<recently read> \pgfplotstable@loc@TMPa
l.25 };
! Package pgfplots Error: The requested list entry with index 0 of \pgfplots@ta
ble is too large; this list has not enough elements..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
...
l.25 };
! Package pgfplots Error: Sorry, could not retrieve column '' from table '\\pgf
plots@table@@table@name '. Please check spelling (or introduce name aliases)..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
...
l.25 };
! Package pgfplots Error: The requested list entry with index 1 of \pgfplots@ta
ble is too large; this list has not enough elements..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
...
l.25 };
! Package pgfplots Error: Sorry, could not retrieve column '' from table '\\pgf
plots@table@@table@name '. Please check spelling (or introduce name aliases)..
See the pgfplots package documentation for explanation.
Type H <return> for immediate help.
...
l.25 };
! Package pgfplots Warning: the current plot has no coordinates (left?)
! Package pgfkeys Error: I do not know the key '/tikz/legend cell align' and I
am going to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.28 \end{axis}
) <use Queenslscapelogocmyk-eps-converted-to.pdf>
<use Aqua-spot-rgb-clear10025.jpg> <use TUHHLogo-eps-converted-to.pdf> [10]
(./GroupSemPres.aux)
LaTeX Font Warning: Size substitutions with differences
(Font) up to 1.0pt have occurred.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)`
좌표계와 범례는 표시되지만 데이터는 표시되지 않습니다. 나는 데이터를 테이블이 아닌 좌표로 제공할 때 무언가를 플롯한다는 것을 방금 발견했습니다. Linux의 tikz 테이블에 일반적인 문제가 있거나 뭔가 빠졌을 수 있습니다. 그렇지 않으면 matlab2tikz가 제공하는 전체 tikz 파일을 좌표 목록으로 변환해야 합니다.
다음은 matlab2tikz에서 얻은 tikz 파일입니다(더 짧게 만들기 위해 일부 데이터를 삭제했습니다).
% This file was created by matlab2tikz v0.4.7 running on MATLAB 8.1.
% Copyright (c) 2008--2014, Nico Schlömer <[email protected]>
% All rights reserved.
% Minimal pgfplots version: 1.3
%
% The latest updates can be retrieved from
% http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
% where you can also make suggestions and rate matlab2tikz.
%
\begin{tikzpicture}
\begin{axis}[%
width=5cm,
height=4cm,
scale only axis,
xmin=0,
xmax=0.018,
ymin=0.00015,
ymax=0.0005,
legend style={draw=black,fill=white,legend cell align=left}
]
\addplot [color=blue,solid]
table[row sep=crcr]{0 0.000311697265625003\\
0.001953125 0.000321697265625003\\
};
\addlegendentry{wp1Exp};
\end{axis}
\end{tikzpicture}%