demo/wordrotation.R

# the simplest animation: rotate the word
for (i in 1:360) {
  dev.hold()
  plot(1, ann = FALSE, type = 'n', axes = FALSE)
  text(1, 1, 'Animation', srt = i, col = rainbow(360)[i], cex = 7 * i/360)
  ani.pause(0.01)
}
yihui/animation documentation built on March 27, 2023, 2:50 p.m.