由于某种原因,我无法格式化刻度号并同时限制它,这是哪里出了问题?
它会反复渲染错误
[{
"owner": "LaTeX",
"severity": 8,
"message": "Something's wrong--perhaps a missing \\item.\n",
"source": "LaTeX",
"startLineNumber": 17,
"startColumn": 1,
"endLineNumber": 17,
"endColumn": 65536
}]
[{
"owner": "LaTeX",
"severity": 8,
"message": "Package pgfkeys: I do not know the key '/pgf/number format/at', to which you passed '(yticklabel* cs:1.03,-0.3em)', and I am going to ignore it. Perhaps you misspelled it.\n",
"source": "LaTeX",
"startLineNumber": 45,
"startColumn": 1,
"endLineNumber": 45,
"endColumn": 65536
}]
金属加工液
\documentclass[border={3mm}]{standalone}
\usepackage[hyperref]{xcolor} % Options: gray - dark and light
\setlength\textwidth{160mm}
\usepackage{tikz}\usetikzlibrary{babel}
\usepackage{pgf,pgfmath,pgfplots}
\pgfplotsset{
compat = newest,
width = .95\linewidth, % width
height = 7cm, % height
% Tick Label
xticklabel style={
/pgf/number format/.cd,
set thousands separator={\,},
},
}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}
\addplot[
domain={-9:-5.5},
thick,
samples=2,
] { -0.0127*x-0.0483 };
\addplot[
mark=*,
only marks,
] coordinates {
(-9.210340371976182, 0.068)
(-8.517193191416238, 0.060)
(-7.600902459542082, 0.048)
(-6.907755278982137, 0.039)
};
\addplot[
mark=*,
only marks,
] coordinates {
(-5.298317366548036, 0.036)
(-4.605170185988091, 0.036)
};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}