anim.save: Save an anim.frames object in various formats.

Description Usage Arguments Examples

View source: R/postprocessing.R

Description

This function simply calls replay on the object and then calls saveGIF and friends on the result.

Usage

1
2
3
4
5
6
7
anim.save(
  obj,
  filename,
  type = switch(file_ext(filename), gif = "GIF", mp4 = "Video", swf = "SWF", html =
    "HTML", tex = "Latex"),
  ...
)

Arguments

obj

an anim.frames object, or an expression to evaluate

filename

file to save to

type

one of 'GIF', 'Video', 'SWF', 'HTML', or 'Latex'

...

arguments passed to e.g. saveGIF

Examples

1
2
3
4
5
6
7
8
## Not run: 
tmp <- anim.plot(1:10, 1:10, pch=1:10, show=FALSE)
anim.save(tmp, "mygif.gif")

anim.save(replay(tmp, after=legend("topleft", legend="My legend")), 
   "mygif2.gif")

## End(Not run)

anim.plots documentation built on April 30, 2021, 5:07 p.m.