tikz의 \onslide 명령은 오류나 효과를 생성하지 않습니다.

tikz의 \onslide 명령은 오류나 효과를 생성하지 않습니다.

저는 tikz를 처음 접했고 처음으로 \onslide 명령을 사용해 보았습니다. 내 코드에서 오류는 발생하지 않지만 효과도 발생하지 않는 이유를 이해할 수 없습니다(모든 내용이 포함된 3개의 슬라이드에 3개의 동일한 플롯 생성).

내 MWE는 다음과 같습니다.

\documentclass[10pt]{beamer}
\usetheme{Madrid}

% Plot
\usepackage{tikz}
\usepackage{tkz-euclide}    % Coordinate axes
\usepackage{pgfplots}       % Another axes package
\pgfdeclarelayer{background}% determine background layer
\pgfsetlayers{background,main}% order of layers

\begin{document}

\begin{frame}{Sample}
\begin{figure}
    \centering
\pgfplotsset{xmin=0, xmax=1, ymin=0, ymax=1}    
\pgfplotsset{compat=1.17}
\begin{tikzpicture}[scale=1]
\begin{axis}[domain=0:1,
    ylabel near ticks,
    xlabel near ticks,
    xlabel={$m$},
    ylabel={$n$},
    clip mode=individual]
\addplot[black,dashed,domain=0:1,smooth]  plot ({\x}, {\x });
\addplot[black,thick,domain=0:1,smooth,samples=500]  plot ({ 3*\x/(3*\x + (1-\x)) }, {\x});
\node[anchor=south] at (0.75,0.55) {$\color{black}g_b$};
\onslide<2->{
\addplot[black,thick,domain=0:1,smooth,samples=500]  plot ({ 9*\x/(9*\x + (1-\x)) }, {\x});
\node[anchor=south] at (0.8,0.4) {$\color{black}g_b^2$}; }
\onslide<3->{
\addplot[black,thick,domain=0:1,smooth,samples=500]  plot ({ 81*\x/(81*\x + (1-\x)) }, {\x});
\node[anchor=south] at (0.9,0.2) {$\color{black}g_b^3$}; }
\end{axis}
\end{tikzpicture} 
\end{figure}

\end{frame}
\end{document}

답변1

글쎄, 내 생각엔 그것을 다음과 같이 바꿀 것 같아

\only<overlay specification>{\addplot { ... };}

공장. 다른 사람들이 이 문제를 발견하는 데 도움이 되기를 바랍니다!

관련 정보