anim.barplot {anim.plots}R Documentation

Create an animated barplot.


Create an animated barplot.



## Default S3 method:
  times = NULL,
  show = TRUE,
  speed = 1,
  use.times = TRUE,
  window = t,
  window.process = NULL,
  width = 1,
  space = NULL,
  names.arg = NULL,
  beside = FALSE,
  density = NULL,
  angle = NULL,
  col = NULL,
  border = NULL,
  horiz = FALSE,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  sub = NULL,
  offset = NULL,
  legend.text = NULL,



a vector, matrix or array. If a vector it is divided up by times and barplot is called on each chunk. If a matrix, barplot is called on each column. If an array, barplot is called on each matrix of form height[,,i].


a vector of times. If NULL and height is a matrix, the last dimension of height will be used

show, speed, use.times, window, window.process

see anim.plot

width, space, beside, names.arg, density, angle, col, border, horiz, xlim, ylim, xlab, ylab, main, sub, offset, legend.text, ...

arguments passed to barplot.


Arguments width, names.arg, density, angle, col, border and offset may be either vectors of length length(tbl) or matrices with one column for each unique value of times. Other arguments should be length 1 or vectors.


anim.barplot(1:100, times=rep(1:10, each=10), ylim=c(0,100))
## barplot with a matrix
ChickWeight$wq <- cut(ChickWeight$weight, 5)
tbl <- as.array(xtabs(~ wq + Diet + Time, data=ChickWeight))
ptbl <- prop.table(tbl, 2:3)
anim.barplot(ptbl, xlab="Diet", ylab="N", xlim=c(0,8), legend.text=paste(
     "Quintile", 1:5), col=1:5)
anim.barplot(tbl, xlab="Diet", ylab="N", beside=TRUE, ylim=c(0,20),
   legend.text=paste("Quintile", 1:5), col=1:5)

[Package anim.plots version 0.2.2 Index]