options
to set an option
ani
which is a list containing the animation parameters.ani.options(...)
tag = value
form, or a list of tagged
values. The tags must come from the animation parameters described
below.ani.options
to restore the parameter values.options
# store the old option to restore it later
oopt = ani.options(interval = 0.05, nmax = 100, ani.dev = "png",
ani.type = "png")
ani.start()
opar = par(mar = c(3, 3, 2, 0.5), mgp = c(2, .5, 0), tcl = -0.3,
cex.axis = 0.8, cex.lab = 0.8, cex.main = 1)
brownian.motion( pch = 21, cex = 5, col = "red", bg = "yellow",
main = "Demonstration of Brownian Motion",)
par(opar)
ani.stop()
ani.options(oopt)
Run the code above in your browser using DataLab