I have a plot which is rather expensive to "present", and I want to create an animation on top of it.
EDIT:
"present" here does not just mean create the plot, but also to rasterize and present in on the Notebook.
I tried to create the plot before by doing plot=Plot[...]
and then use Show[plot,Animate[...]]
, but Mathematica does not allow to combine plots with Animations.
If I put the plot inside the animation, it gets really slow as it re-renders the plot at each frame.
Another thing I tried was to present the plot as an background image of the animation, but I'm not being able to make backgrounds other than RGBColors (and I don't even know if this works).
Is there any proper way of achieving this?
EDIT2:
One example of such plot
plot = ContourPlot[Cos[x] + Cos[y], {x, 0, 4 Pi}, {y, 0, 4 Pi},
PlotPoints -> 200, MaxRecursion -> 2, Mesh -> None];
The number of PlotPoints
is big because in my particular case the function to be plotted is non trivial, and requires a lot of resolution to see anything. (I'm not putting here the code because the function is obtained as an iterative process, and is out of the scope of this question)
Plot
takes too much time, considerRasterize
ing it. $\endgroup$