Learn R Programming

cylcop (version 0.2.0)

plot_circ_hist: Circular Histogram of Turn Angles

Description

This function produces a circular histogram of turn angles, i.e. angles on the the half-circle between -pi and pi.

Usage

plot_circ_hist(theta, nbars = 20)

Value

A 'ggplot' object.

Arguments

theta

numeric vector of angles (measurements of a circular variable) or "circular" component of pseudo-observations. They must be on the half-circle, i.e. theta must be in \([-\pi, \pi)\).

nbars

numeric integer, the number of bins (bars) in the histogram.

References

Hodelmethodcylcop

See Also

plot_joint_scat().

Examples

Run this code
set.seed(123)

theta <- cylcop::rvonmisesmix(n = 100,
  mu = c(0, pi),
  kappa = c(5, 2),
  prop = c(4, 2)
)
plot1 <- plot_circ_hist(theta)

Run the code above in your browser using DataLab