display_dist: 1d distribution tour path animation.

Description Usage Arguments See Also Examples

View source: R/display-density.r

Description

Animate a 1d tour path with a density plot or histogram.

Usage

1
2
3
4
display_dist(method = "density", center = TRUE, half_range = NULL,
  rug = FALSE, ...)

animate_dist(data, tour_path = grand_tour(1), ...)

Arguments

method

display method, histogram or density plot

center

should 1d projection be centered to have mean zero (default: TRUE). This pins the centre of distribution to the same place, and makes it easier to focus on the shape of the distribution.

half_range

half range to use when calculating limits of projected. If not set, defaults to maximum distance from origin to each row of data.

rug

draw rug plot showing position of actual data points?

...

other arguments passed on to animate

data

matrix, or data frame containing numeric columns

tour_path

tour path generator, defaults to 2d grand tour

See Also

animate for options that apply to all animations

Examples

1
2
3
4
5
6
7
8
animate_dist(flea[, 1:6])

# 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")

nspyrison/tourr documentation built on Aug. 29, 2019, 2:56 a.m.