animate_dist(flea[, 1:6])
# Change inputs, to color by group, fix y axis, change bin width
# and scale bar height or density at each projection
animate_dist(flea[, 1:6], col=flea$species, density_max=5)
animate_dist(flea[, 1:6], col=flea$species, density_max=5, bw=0.1)
animate_dist(flea[, 1:6], col=flea$species, scale_density=TRUE)
# When the distribution is not centred, it tends to wander around in a
# distracting manner
animate_dist(flea[, 1:6], center = FALSE)
# Alternatively, you can display the distribution with a histogram
animate_dist(flea[, 1:6], method = "hist")
Run the code above in your browser using DataLab