reanimate: Bring a ggplot to life (re-animate)

View source: R/ghost.R

reanimateR Documentation

Bring a ggplot to life (re-animate)

Description

Creates an animation showing the stepwise process of building up a ggplot. Successively adds calls from a ggghost object and then combines these into an animated GIF.

Usage

reanimate(
  object,
  gifname = "ggghost.gif",
  interval = 1,
  ani.width = 600,
  ani.height = 600
)

lazarus(
  object,
  gifname = "ggghost.gif",
  interval = 1,
  ani.width = 600,
  ani.height = 600
)

Arguments

object

A ggghost object to animate

gifname

Output filename to save the .gif to (not including any path, will be saved to current directory)

interval

A positive number to set the time interval of the animation (unit in seconds); see animation::ani.options

ani.width

width of image frames (unit in px); see animation::ani.options

ani.height

height of image frames (unit in px); see animation::ani.options

Value

TRUE if it gets that far

Examples

## Not run: 
## create an animation showing the process of building up a plot
reanimate(z, "mycoolplot.gif")

## End(Not run)

jonocarroll/ggghost documentation built on June 14, 2025, 3:56 a.m.