anim.plots
provides simple animated versions of basic R plots, using the animation
package. It includes animated versions of plot
, barplot
, persp
, contour
,
filled.contour
, hist
, curve
, points
, lines
, text
, symbols
, segments
, and
arrows
.
Stable version from CRAN:
install.packages("anim.plots")
Latest version from github:
# install.packages("devtools")
devtools::install_github("anim.plots/hughjonesd")
Zooming into a bivariate normal distribution:
x <- rep(rnorm(400), 10)
y <- rep(rnorm(400), 10)
xlims <- 4 * 2^-(1:10/10)
ylims <- xlims <- rbind(xlims, -xlims)
anim.plot(x, y, times = 10, speed = 2, xlim = xlims, ylim = ylims, col = rgb(0,1,0,.3), pch = 19)
Got a nice example? Tweet it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.