anim.barplot {anim.plots} | R Documentation |
Create an animated barplot.
Description
Create an animated barplot.
Usage
anim.barplot(...)
## Default S3 method:
anim.barplot(
height,
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,
...
)
Arguments
height |
a vector, matrix or array. If a vector it is divided up by
|
times |
a vector of times. If NULL and |
show , speed , use.times , window , window.process |
see |
width , space , beside , names.arg , density , angle , col , border , horiz , xlim , ylim , xlab , ylab , main , sub , offset , legend.text , ... |
arguments passed to |
Details
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.
Examples
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]