swf: SWF graphics device

Description Usage Arguments Author(s) Examples

View source: R/swfDevice.R

Description

This function opens a SWF device that produces Flash animation in SWF format. Every time you call a high level plotting function like plot(), the movie will create a new frame and draw following shapes on it.

Usage

1
2
  swf(file = "Rplots.swf", width = 7, height = 7,
    bg = "white", fg = "black", frameRate = 12)

Arguments

file

a character string giving the output SWF file

width

the width of the device in inches

height

the height of the device in inches

bg

the background color of the SWF file

fg

initial foreground color

frameRate

how many frames to be played in 1 second

Author(s)

Yixuan Qiu <http://yixuan.cos.name/>

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## A demonstration of K-means clustering, using animation package
if(require(animation)) {
    swf("kmeans.swf", frameRate = 1)
    kmeans.ani()
    dev.off()
}

## End(Not run)

yixuan/R2SWF-archive documentation built on May 4, 2019, 5:28 p.m.