업데이트: 오버레이 대신 애니메이션

업데이트: 오버레이 대신 애니메이션

비머에서 애니메이션 선을 그릴 수 있기를 바랍니다.

우선 살펴보기

우선 살펴보기

최종 모습

애니메이션이 포함된 한 프레임에

사진을 제공해주신 @Kevin C에게 감사드립니다.

\documentclass[leqno,mathserif]{beamer}

\usepackage[english,french]{babel}
\usepackage{dsfont}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{animate}

\setbeamercovered{transparent}
\usepackage{pifont}
\usepackage{xcolor}
\usepackage{enumitem}


\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\begin{axis}[axis y line=none, y=0.5cm/3, restrict y to domain=0:20, axis lines=left]

\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}

답변1

업데이트: 오버레이 대신 애니메이션

패키지 로 세 프레임 모두에 애니메이션을 적용하려면 환경에 대한 "타임라인"을 지정하는 텍스트 파일( 다음 예에서) 과 함께 환경을 animate사용할 수 있습니다 .animateinlinestack.txt

암호

\documentclass{beamer}
\usepackage{tikz,animate}
\usetikzlibrary{decorations.pathreplacing}

\begin{filecontents}{stack.txt}
::0x0
::1x0
::2x0
::3x0
\end{filecontents}

\newcommand\tick[2][]{\draw(#2,3pt)--(#2,-3pt)node[below]{#1};}
\newcommand\tikzmark[1]{\tikz[remember picture,baseline=(#1.base)]\node[inner sep=0](#1){$#1$};}

\begin{document}

\begin{frame}

\centering
\begin{animateinline}[autoplay,loop,poster=last,
  begin={\begin{tikzpicture}[remember picture]\useasboundingbox(0,-1)rectangle(8,1.7);},
  end={\end{tikzpicture}},
  timeline={stack.txt}
]{1}
  \newframe
    \draw[line width=2pt,-latex](0,0)--(8,0);
    \tick[$0$]{.5}
    \tick[\tikzmark{T}]{6}
  \newframe
    \tick[$Dt$]{1.3}
    \tick[$2Dt$]{2.1}
    \node[anchor=west] at (T.east) {$=Dt\cdot L$};
    \foreach \x in {2.9,3.7,4.5,5.3} {\tick{\x}}
  \newframe
    \draw[decorate,decoration={brace,amplitude=4pt}](.5,4pt)--(1.3,4pt)node[midway,above,align=center]{$Dt$\\step size};
    \draw[decorate,decoration={brace,amplitude=4pt}](.5,1.1)--(6,1.1)node[midway,above]{$L$ steps};
\end{animateinline}

\end{frame}
\end{document}

비머 오버레이

TikZ는 오버레이를 지원합니다. 평소대로 구문을 사용하십시오 <overlay spec>.

암호

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}

\newcommand<>\tick[2][]{\draw#3(#2,3pt)--(#2,-3pt)node[below]{#1};}

\begin{document}
\begin{frame}
\centering
\begin{tikzpicture}[font=\footnotesize]
  \draw[line width=2pt,-latex](0,0)--(7,0);
  \tick[$0$]{.5}
  \tick[\alt<2->{\hskip35pt$T=Dt\cdot L$}{$T$}]{6}
  \tick<2->[$Dt$]{1.3}
  \tick<2->[$2Dt$]{2.1}
  \foreach \x in {2.9,3.7,4.5,5.3} {\tick<2->{\x}}
  
  \draw<3->[decorate,decoration={brace,amplitude=4pt}](.5,4pt)--(1.3,4pt)node[midway,above,align=center]{$Dt$\\step size};
  \draw<3->[decorate,decoration={brace,amplitude=4pt}](.5,1.1)--(6,1.1)node[midway,above]{$L$ steps};
\end{tikzpicture}\par
\end{frame}
\end{document}

관련 정보