在此代码中,我尝试插入 pgf 手册第 408 页中的代码
\begin{frame}{Motivation}
\begin{center}
\pgfplotsset{width=7cm,compat=1.13}
\begin{tikzpicture}[scale=0.6]
\begin{axis}[%
width=4.521in,
height=3.566in,
at={(0.758in,0.481in)},
scale only axis,
ticks=none,
xmin=-0,
xmax=10,
ymin=-0,
ymax=5,
axis background/.style={fill=white},
legend style={at={(0.658,0.788)},anchor=south west,legend cell align=left,align=left,draw=white!15!black}
]
\addplot+[domain=1:10,/pgfplots/no markers,samples=200] {4/\x^0.5};
\addplot+[name path=A,domain=0:1,samples=2] {x};
\addplot+[name path=B] table {
x y
0 2
0.5 -1
1 3
};
\addplot fill between[of=A and B];
\end{axis}
\end{tikzpicture}
\captionof{figure}{Caption}
\end{center}
\end{frame}
但我收到以下错误:
Package pgfplots Error: Could not read table file '" x y 0 2 0.5 -1 1 3 "' inrefer to the pgfplotstable manual for details). \end{frame}