I gave a very fetching presentation written with beamer today. It included a pgfplot animated with the animate
package, and the result was fantastic. The problem? One of my colleagues wants to borrow the plot for a presentation written in something non-LaTeX. In addition, it would be nice to know how to externalise animated pgfplots frame by frame for animation using using convert
or mencoder
to produce a standalone file for inclusion in websites etc.
Naturally, I turned to externalize
to do the job for me. It seems that animate
and externalize
don't agree... How can I convince them to kiss and make up?
Below is a massively simplified example for the wizards to work with
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{animate}
% Comment out the following line to see what the plot looks like.
\usepgfplotslibrary{external}\tikzexternalize
\begin{document}
%
\begin{animateinline}[controls]{10}
\multiframe{30}{ind=0+1}{
\begin{tikzpicture}
\begin{axis}[ymin=-1, ymax=1, xmin=0, xmax=3.14]
\addplot {sin(deg(x+\ind*pi/16))};
\end{axis}
\end{tikzpicture}
}
\end{animateinline}
%
\end{document}
animate
and externalize is to loop (with\foreach
or equivalent) externalizing the plots (preferably in a separate document). Then you can animate the pdf's after they have been externalized. I did this also by using the overlay feature which can drastically reduce the size of the ouput pdf. If i have time in the following days i will supply what i did in my bachelor thesis.