Skip to contents

Fits or draws a mixture of von Mises densities.

Usage

stat_vonmises_mixture(
  mapping = NULL,
  data = NULL,
  geom = "line",
  position = "identity",
  ...,
  fit = NULL,
  k = 2,
  nstart = 1,
  seed = NULL,
  kappa_max = 10000,
  n = 512,
  axial = FALSE,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

Arguments

mapping, data, geom, position, show.legend, inherit.aes

Standard ggplot2 layer arguments.

...

Additional arguments passed to the layer.

fit

Optional ggcircular_vonmises_mixture object. If NULL, the mixture is fitted to the layer's x aesthetic.

k

Number of components when fitting inside the statistic.

nstart

Number of EM starts when fitting inside the statistic.

seed

Optional random seed when fitting inside the statistic.

kappa_max

Maximum fitted concentration when fitting inside the statistic.

n

Number of grid points.

axial

Should data be treated as axial, modulo pi?

na.rm

Should missing values be removed before fitting?

Value

A ggplot2 layer.

See also