I've created multiple .pdf files with animations using the animation package in R. For example, I have these two plots:
\documentclass{article} \usepackage{animate} \usepackage{graphicx} \begin{document} \begin{figure} \begin{center} \animategraphics[controls,width=.8\linewidth]{20}{Rplot8_7}{}{} \end{center} \end{figure} \begin{figure} \begin{center} \animategraphics[controls,width=.8\linewidth]{20}{Rplot8_6}{}{} \end{center} \end{figure} \end{document} Here are the .pdf files:
I want to reduce the number of plots to one. So I would like to literally overlay one on top of the other and be able to navigate between these plots with a tab PLUS the ability to navigate between each plot's animations, which is what I have already. So I guess the idea is to have animation on two dimensions: one for the plots, and the other for each plot's animations. To make my point even more clear, here is a crudely drawn MS paint image:

Of course, the final product would just look like one plot with two tabs to navigate between each animation. Is there a way to do this in LaTeX? I've looked at the animate package documentation and couldn't find much. If not, I will look for further options. Of course, any ideas to overcome this is appreciated. Thanks!
UPDATE: Some code I tried to do with more than 2 plots:
\documentclass{article} \usepackage{animate}[2015/03/11] \usepackage{graphicx} \usepackage{ocgx} \usepackage{fixocgx} \begin{document} \begin{figure}\centering \makebox[0pt][l]{% \begin{ocg}{A}{A}{1}% \animategraphics[controls,width=.8\linewidth]{20}{Rplot8_5}{}{}% \end{ocg}% }% \begin{ocg}{B}{B}{0}% \animategraphics[controls,width=.8\linewidth]{20}{Rplot8_6}{}{}% \end{ocg} \begin{ocg}{C}{C}{0}% \animategraphics[controls,width=.8\linewidth]{20}{Rplot8_7}{}{}% \end{ocg} \actionsocg{A B C}{A}{B C}{\fbox{Plot A}} \actionsocg{A B C}{B}{A C}{\fbox{Plot B}} \actionsocg{A B C}{C}{A B}{\fbox{Plot C}} \caption{Two animations on different layers} \end{figure} \end{document} But I get something funky:

Is there a way to get the plots all in one spot instead of putting one on top of the other when space runs out?
\documentclass{...}and ending with\end{document}.