Description Usage Arguments Value Author(s) See Also Examples
View source: R/animatoR-functions-knitr.R
This function interpolates the color between start and end color.
1 2 |
x0 |
vector specifying start colors or factor.
Colors can be specified as numbers or
character strings, see |
x1 |
vector specifying end colors or factor.
Colors can be specified as numbers or
character strings, see |
t |
numeric, homotopy parameter, limited between 0 and 1. This parameter can be considered as fraction of animation duration time. |
when |
numeric vector. This parameter controls the times of: entrance, exit, start of movement and, end of movement. |
p |
numeric, homotopy power parameter. Defaults to 1. |
alpha0, alpha1 |
numeric, transparency value
|
... |
additional arguments passed to |
A character vector with elements of 7 or 9 characters, "#" followed by the red, blue, green and optionally alpha values in hexadecimal (after rescaling to 0 ... 255). The optional alpha values range from 0 (fully transparent) to 255 (opaque).
Andrej Blejec andrej.blejec@nib.si
rgb
for setting colors and
colors
for color names.
See link{makeTransparent}
to add transparency to the colors.
1 2 3 4 5 6 | if(interactive()){
animator('
newplot()
points(5,5,col=trgb("red","blue",t,alpha1=1),pch=16,cex=tcex(80,160,t))',
life=1)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.