
답변1
경계 상자가 그림 크기로 설정된 범위 안에 클라우드 주석을 추가합니다. 이렇게 하면 클라우드가 추가 공간을 차지하지 않습니다. (실제로 이 예에서는 범위가 필요하지 않지만 이를 사용하면 클라우드 부분에 영향을 주지 않고 범위 이후에 그림을 계속할 수 있습니다.)
\documentclass{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\begin{document}
\begin{frame}
\frametitle{Test}
\centering
\begin{tikzpicture}
\node[inner sep=0pt](Img){\includegraphics[width=0.7\linewidth]{example-image}};
\draw<2->[line width=2pt,red](Img.north west) rectangle +(4,-2.5);
\draw<3->[line width=2pt,black!20!green](Img.south west) rectangle ($(Img.south east) + (0,3.1)$);
\onslide<4->{%
\begin{scope}
\useasboundingbox(Img.south west)--(Img.north east);
\node[draw,cloud,anchor=south east,aspect=3,fill=blue,text=white] (Cloud) at ($(Img.north east)+(-0.5,0.5)$){2 variables};
\draw[-latex,very thick] (Cloud.south west) to[bend right] ($(Img.center)+(2,1)$);
\end{scope}}
\end{tikzpicture}
\end{frame}
\end{document}