我正在尝试从目录加载图像,但无法加载,因为我不知道为什么\i
没有显示数字,代码搜索目录但未找到文件。
\documentclass{beamer}
\usepackage{pgfplots}
\usepackage{animate}
\begin{document}
\begin{frame}[label=detour]
\animate<1-3>
\begin{tikzpicture}
\begin{axis}[name=plot1,
clip=false,
axis lines=center,
height=4cm,
width=4cm,
x post scale=1.4,
]
\foreach \i in {1,...,3}{
\only<\i>{\addplot[blue, line width=0pt, fill=blue!20, opacity=0.5] table [col sep=tab,trim cells=true, x index=0, y index=\i] {images_thesis/resolution_images/espectros_im_P_10_F_0_sigma_500.txt}\closedcycle};
\only<\i>{\node[anchor=south west,inner sep=0] at (axis cs:20000,0) {\includegraphics[width=\textwidth]{./images_thesis/resolution_images/img-\i}};}}
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
pdflatex 编译时的错误是
File `./images_thesis/resolution_images/img-\i ' not found. \end{frame}