pgf gif 解释

pgf gif 解释

我对 latex 和 pgfplots 还很陌生。我正在尝试制作一个 gif。有人能解释一下<\fr>以下代码中 pgfonlayer 部分的功能是什么吗?

gif 图像

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage{lmodern}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes}


\tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]

\usetheme{Frankfurt}

\setbeamertemplate{navigation symbols}{}%
\tikzset{
   error_00/.style={color=blue,thin},
}
\begin{document}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}

\begin{frame}
    \begin{figure}
        \begin{tikzpicture}[scale=1]

\foreach \pos/\name in {{(-12.117,45.857)/a}, {(-12.117,45.857)/b}, {(-7.809,45.857)/c}}
                \node (\name) at \pos {};


\draw[x=1 cm,y=1 cm,error_00] (-10.628,45.857) -- (-7.809,45.857);
\begin{pgfonlayer}{background}
                \foreach \source / \dest / \fr in {a/b/1/, b/c/2/}
                    \path<\fr>[selected edge] (\source.center) edge (\dest.center);
\end{pgfonlayer}
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}

我从此链接编译该文件:https://martin-thoma.com/how-to-visualize-graph-algorithms-with-latex。另外,我不想让红线闪烁。我只想让它出现。有什么办法可以用最少的改动来实现它吗?提前谢谢。

相关内容