Making an Animated Heart GIF in R

May 5, 2012
By

(This article was first published on Data, Evidence, and Policy - Jared Knowles, and kindly contributed to R-bloggers)

Messing around with animations, I created this toy example to make a growing outline of a heart in R. I have put it up as a gist on GitHub and embedded it below. It uses the animation and the ggplot2 packages--both of which make it incredibly simple to make a good looking graphic.

 The formula to draw the hearts can be found thanks to Wolfram MathWorld.

 

To leave a comment for the author, please follow the link and comment on his blog: Data, Evidence, and Policy - Jared Knowles.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.