If I set ymax in the second axis TeX give me a Dimension too large Error and I dont know why Does anybody see the mistake?
\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}
\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Moriambar Jun 12 '17 at 20:44\addplot [red,solid,mark options={solid}] coordinates {(0,0) (1,850)};. Do you want to make two y-axis? Then have look at pgfplots: two y-axis with three plots and one legend. – hzhr Jun 12 '17 at 21:35.csvdata. You see here how thefilecontentpackage is used. Without MWE (compilable), thats represent your problem, is hard to help. – Bobyandbob Jun 15 '17 at 19:03rndinstead of your data, the code works perfectly fine. For that reason I'm going to vote to close as unclear, but I'll be sure to vote to reopen if needed. (I'll note also that many others have encountered that error, probably in various cases. In case you haven't looked at any of these yet, perhaps some hints can be found: https://tex.stackexchange.com/search?q=%5Bpgfplots%5D+dimension+too+large) – Torbjørn T. Aug 14 '17 at 20:25