可以在第 353 页“pgfplots 软件包版本 1.16 手册”中看到以下代码。我运行它,但是,我有一个错误
! Dimension too large. <recently read> \pgf@xx l.28 \end{loglogaxis}
当\draw
命令处于 Inactive 状态时,它起作用了!亲爱的朋友们,问题出在哪里?
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{graphicx}
%\usepackage{pgfplotstable}
\begin{document}
%\begin{figure}
%\pgfplotsset{compat=1.16}
\begin{tikzpicture}
\begin{loglogaxis}[title=Convergence Plot, xlabel={Degrees of freedom}, ylabel={$L_2$ Error},legend entries={$d=2$,$d=3$},grid=major,]
\draw (1793,4.442e-05) |- (4097,1.207e-05) node [near start,left] {$\frac{dy}{dx} = -1.58$};
\addplot coordinates {
(5, 8.312e-02)
(17, 2.547e-02)
(49, 7.407e-03)
(129, 2.102e-03)
(321, 5.874e-04)
(769, 1.623e-04)
(1793, 4.442e-05)
(4097, 1.207e-05)
(9217, 3.261e-06)
};
\end{loglogaxis}
\end{tikzpicture}
%\caption{...}
%\end{figure}
\end{document}