powered by
Waggle back and forth between two numbers
waggle(min, max, value = (min + max)/2, step = (max - min)/50, fps = 10)
A minimum value.
A maximum value.
Starting value. Defaults to half-way between min and max.
min
max
How much value changes at each frame. Defaults to 50 steps between min and max so it takes 5 seconds to waggle once.
number of frames per second.
span <- waggle(0.2, 1) mtcars %>% ggvis(~mpg, ~wt) %>% layer_points() %>% layer_smooths(span = span)
Run the code above in your browser using DataLab