如果我在第二个轴上设置 ymax,TeX 会给我一个尺寸太大的错误,我不知道为什么有人看到这个错误吗?
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{float}
\begin{document}
\begin{center}
\begin{figure}[H]
\caption{Gemessene Berschleunigung auf gerader und schräger Fläche}
\label{num1}
\centering
\begin{tikzpicture}[baseline=(current axis.south)]
\begin{axis}[grid = major,width=0.8\textwidth,height=0.35\textheight,
x tick label style={/pgf/number format/1000 sep=},
xlabel={Zeit $t$ $[s]$},ymax=850,
y tick label style={/pgf/number format/1000 sep=},
ylabel={Berschleunigung $a$ $[\frac{m}{s^2}]$},
axis y line=left,
enlarge x limits=0.01,xtick=\empty,
legend pos=north west]
\addplot [blue,solid,mark options={solid}] table[x=t, y=f,col sep=semicolon] {Mappe1.csv};
\label{f}
\addlegendentry{$f$}
\end{axis}
\begin{axis}[ymin=0, ymax=1.2,width=0.8\textwidth,height=0.35\textheight,
x tick label style={/pgf/number format/1000 sep=},
xlabel={Zeit $t$ $[s]$},
y tick label style={/pgf/number format/1000 sep=},
ylabel={Berschleunigung $a$ $[\frac{m}{s^2}]$},
axis y line=right,
enlarge x limits=0.01,
legend pos=north west]
\addlegendimage{/pgfplots/refstyle=f}\addlegendentry{$f$}
\addplot [red,solid,mark options={solid}] table[x=t, y=Schub,col sep=semicolon] {Mappe1.csv};
\addlegendentry{Schub}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{center}
\end{document}