JPlotSceneFn | R Documentation |
JPlotSceneFn
is not usually called directly, rather it is invoked
internally from inside JAnimateScenes
. Combines a list of
scenes, and returns a function that plots a single frame from the appropriate
scene. Can be useful for debugging an animation, because it can be used to
plot a single frame.
JPlotSceneFn(scenes)
scenes |
A list of scene objects, each one created by calling the
|
A function that accepts a single argument, a frame number, and plots
the appropriate frame from the animation. The function is intended to be
used as the plotFn
argument to JAnimateGIF
.
JAnimateScenes
# Construct an animation
scenes <- list(JScene(1, 20,
pt2 = JTransition(0, 1),
plotFn = function(pt2) {
plot(c(0, pt2), c(0, pt2), type = "b", xlim = c(0, 1))
}))
# Plot frame 10 to see what it looks like
JPlotSceneFn(scenes)(10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.