JAnimateScenes | R Documentation |
JScene
s.Animates a list
of JScene
objects by plotting each frame
and then combining them into a single animated GIF.
JAnimateScenes(videoFileName, scenes, ...)
videoFileName |
Name of the GIF file to be created. |
scenes |
A list of scene objects, each one created by calling the
|
... |
Additional parameters are passed on to |
See JAnimateGIF
for general information about creating
animations from R.
The list of arguments passed to the JAnimateGIF
function (invisibly).
JAnimateGIF
, JScene
, JTransition
, JEase
, JPlotSceneFn
## Not run:
scenes <- list(JScene(1, 20,
pt1 = JTransition(1, 0, JEaseInOut),
pt2 = JTransition(0, 1),
plotFn = function(pt1, pt2) {
plot(c(pt1, pt2), c(1, pt2), type = "b", xlim = c(0, 1), ylim = c(0, 1))
}),
JScene(1, 20,
pt1 = JTransition(0, 1, JEaseInOut),
pt2 = JTransition(1, 0, JEaseIn),
plotFn = function(pt1, pt2) {
plot(c(pt1, pt2), c(1, pt2), type = "b", xlim = c(0, 1), ylim = c(0, 1))
})
)
JAnimateScenes("animation.gif", scenes)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.