R/mix.circplot.R

Defines functions mix.circplot

Documented in mix.circplot

mix.circplot <- function(u, ina, mu, rads = TRUE, lwd = 2) {
  if ( !rads )  u <- u * pi / 180
  dat <- circular::circular(u)
  cx <- cos(mu)  ;  cy <- sin(mu)
  k <- length(mu)
  plot(dat[ina == 1], stack = TRUE)
  arrows(x0 = 0, y0 = 0, x1 = cx[1], y1 = cy[1], length = 0.10, lwd = lwd, col = 1)
  for ( i in 2:k ) {
    points(dat[ina == i], stack = TRUE, col = i)
    arrows(x0 = 0, y0 = 0, x1 = cx[i], y1 = cy[i], length = 0.10, lwd = lwd, col = i)
  }

}

Try the circda package in your browser

Any scripts or data that you put into this service are public.

circda documentation built on Sept. 15, 2026, 5:09 p.m.