Incluyendo imágenes y animaciones en el mismo entorno.

Incluyendo imágenes y animaciones en el mismo entorno.

En mi presentación de proyector, tengo tres imágenes y un pdf combinado que quiero animar usando el animatepaquete. La configuración es la siguiente: las tres imágenes están alineadas una al lado de la otra y quiero reemplazar la tercera imagen con la animación. Es decir, en la primera diapositiva, quiero que las tres imágenes estén una al lado de la otra, y en la segunda diapositiva, quiero que las dos imágenes de la izquierda estén al lado de la animación (de modo que la animación reemplace a la tercera imagen).

Aquí hay una foto:

ingrese la descripción de la imagen aquí

Aquí hay un MWE para mostrar lo que intenté hacer:

\documentclass[8pt]{beamer}

\usetheme{Luebeck}
\usefonttheme{serif}
\setbeamertemplate{itemize item}{\color{black} $\vcenter{\hbox{\tiny$\bullet$}}$} %style of item
\setbeamertemplate{footline}[frame number]{}
\setbeamertemplate{navigation symbols}{}

\usepackage{xcolor}
\usepackage{graphicx}
\setlength{\parskip}{0.75em}
\usepackage{animate}
\usepackage{tikzsymbols}

\begin{document}

\begin{frame}

\begin{figure}
    \centering
    \includegraphics<1->[width = 0.33\textwidth]{cont_lasso.pdf}
    \includegraphics<1->[width = 0.33\textwidth]{cont_ridge.pdf}
    \includegraphics<1>[width = 0.33\textwidth]{cont_enet.pdf}
    \animategraphics<2>[autoplay, loop, width = 0.33\textwidth]{30}{enet_ani_merged}{}{}
\end{figure}

The \textit{shape} of the penalty can give some idea of the type of shrinkage imposed on the model.
\begin{itemize}
    \item Sharp corners $\to$ sparsity! \Laughey[1.5][yellow][pink]
    \item Round corners $\to$ only shrinkage!
\end{itemize}

\end{frame}

\end{document}

Los nombres de archivo de las tres imágenes son cont_lasso.pdf, cont_ridge.pdfy cont_enet.pdf, y el nombre del pdf combinado para la animación es enet_ani_merged.pdf.

EDITAR

Para aclarar, quiero que la animación comience a reproducirse automáticamente cuando comienzo la segunda diapositiva.

Después de experimentar un poco, parece que mi problema se debe a que no está permitido colocar el animategraphicscomando dentro de un figureentorno, y no debido a las superposiciones. Ahora quiero saber cómo puedo poner los dos gráficos y la animación en el mismo entorno.

Respuesta1

Dejando de lado leandriislos comentarios, aquí está el código para cualquiera que quiera ver cómo se ve el resultado final. Tuve que agregar noframenumberingpara que el número de cuadro no cambie.

\documentclass[8pt]{beamer}

\usetheme{Luebeck}
\usefonttheme{serif}
\setbeamertemplate{itemize item}{\color{black} $\vcenter{\hbox{\tiny$\bullet$}}$} %style of item
\setbeamertemplate{footline}[frame number]{}
\setbeamertemplate{navigation symbols}{}

\usepackage{xcolor}
\usepackage{graphicx}
\setlength{\parskip}{0.75em}
\usepackage{animate}
\usepackage{tikzsymbols}

\begin{document}

\begin{frame}{Contour plots}

\begin{figure}
    \centering
    \includegraphics[width = 0.33\textwidth]{cont_lasso.pdf}
    \includegraphics[width = 0.33\textwidth]{cont_ridge.pdf}
    \includegraphics[width = 0.33\textwidth]{cont_enet.pdf}
    %\animategraphics[autoplay, loop, width = 0.33\textwidth]{30}{enet_ani_merged}{}{}
\end{figure}

The \textit{shape} of the penalty can give some idea of the type of shrinkage imposed on the model.
\begin{itemize}
    \item Sharp corners $\to$ sparsity! \Laughey[1.5][yellow][pink]
    \item Round corners $\to$ only shrinkage!
\end{itemize}

\end{frame}

\begin{frame}[noframenumbering]{Contour plots}

\begin{figure}
    \centering
    \includegraphics[width = 0.33\textwidth]{cont_lasso.pdf}
    \includegraphics[width = 0.33\textwidth]{cont_ridge.pdf}
    %\includegraphics[width = 0.33\textwidth]{cont_enet.pdf}
    \animategraphics[autoplay, loop, width = 0.33\textwidth]{30}{enet_ani_merged}{}{}
\end{figure}

The \textit{shape} of the penalty can give some idea of the type of shrinkage imposed on the model.
\begin{itemize}
    \item Sharp corners $\to$ sparsity! \Laughey[1.5][yellow][pink]
    \item Round corners $\to$ only shrinkage!
\end{itemize}

\end{frame}

\end{document}

Aquí hay una captura de pantalla del resultado (no pude encontrar una manera de grabar la pantalla del pdf, la figura de la derecha debe estar en movimiento):

ingrese la descripción de la imagen aquí

información relacionada