我在尝试绘制 .csv 表时收到以下错误(表格链接: https://github.com/JKhay/LaTeX) 到一篇文章:
Missing \endcsname inserted.
<to be read again>
\penalty
l.107 ...emicolon, each nth point=10] {C1PDF.csv};
^^M
Missing \endcsname inserted.
<to be read again>
\penalty
l.107 ...emicolon, each nth point=10] {C1PDF.csv};
^^M
Package pgfplots Warning: Table 'C1PDF.csv' has non-unique column name '\penalty \@M e'.
Only the first occurence can be accessed via column names. on input line 107.
tikz 图片的代码:
\begin{figure}[ht!]
\centering
\begin{tikzpicture}
\begin{axis}[
width=70 mm,
height=70 mm,
y label style={at={(axis description cs:-0.1,.5)},rotate=0,anchor=south},
xlabel={Displacement [nm]},
yticklabel style={/pgf/number format/.cd, fixed, fixed zerofill, precision=1, /tikz/.cd },
xticklabel style={/pgf/number format/.cd,,1000 sep={\,}, fixed, fixed zerofill, precision=0, /tikz/.cd}, scaled ticks=false,
ylabel={Load [mN]},
xmin=0, xmax=350,
ymin=0, ymax=2.7,
xtick={0,100,200,300},
ytick={0.0,0.5,1.0,1.5,2.0,2.5},
ymajorgrids=true,
grid style=dashed,
legend columns=2,
legend style={at={(0.19,0.98)},anchor=north west},
legend entries={Clinker, CH , Inner p., Outer p.},
]
\addplot [color=magenta, thick] table [x=dC, y=LC, col sep=semicolon, each nth point=10] {C1PDF.csv};
\addplot [color=green, thick] table [x=dCH, y=LCH, col sep=semicolon, each nth point=10] {C1PDF.csv};
\addplot [color=cyan, thick] table [x=dIP, y=LIP, col sep=semicolon, each nth point=10] {C1PDF.csv};
\addplot [color=red, thick] table [x=dS, y=LS, col sep=semicolon, each nth point=10] {C1PDF.csv};
\end{axis}
\end{tikzpicture}
\caption{Typical load-displacement curves.}
\label{fig:curves}
\end{figure}
第 107 行指的是:
\addplot [color=magenta, thick] table [x=dC, y=LC, col sep=semicolon, each nth point=10] {C1PDF.csv};
文章的页眉和页脚:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{textcomp}
\pgfplotsset{compat=1.15}
\begin{document}
.
.
.
.
\end{document}
因此,不应该缺少任何包。此外,.csv 文件与我编译的主 .tex 文件位于同一目录中。
请问您有什么建议吗?
谢谢。
答案1
没有答案!
- 我尝试查看用户的评论https://tex.stackexchange.com/users/194703。
- 以下是该文件的截图(来自https://github.com/JKhay/LaTeX,见问题)。
- 我在第一行前面看不到“奇怪”的字符。
- 也许用户https://tex.stackexchange.com/users/194703可以澄清他的发现。