plot_batmix_sample: Plot a sample of Batschelet mixture parameter sets.

Description Usage Arguments Value Examples

View source: R/plotFunctions.R

Description

Plot a sample of Batschelet mixture parameter sets.

Usage

1
2
3
plot_batmix_sample(x, param, dbat_fun = dinvbat, plot_n = nrow(param),
  hist_alpha = 0.3, dens_darkness = 20, bins = 100, res = 400,
  orderColor = FALSE)

Arguments

x

An optional dataset of angles to be plotted as a histogram.

param

A matrix of parameter sets.

dbat_fun

A function; The pdf of the chosen Batschelet distribution.

plot_n

Integer; the number of parameter rows to sample from the matrix param. This is intended for MCMC for example, where we can take a subsample of the parameter matrix to plot for speed.

hist_alpha

Numeric; The alpha value of the histogram of the data.

dens_darkness

Numeric; Higher numbers result in less transparent densities plotted.

bins

The number of bins to draw in the histogram.

res

Number of points at which to evaluate the functions.

orderColor

Logical; If TRUE, plotted pdfs get darker and more red as they were sampled later.

Value

A ggplot.

Examples

1
2
3
4
x <- rinvbatmix(50)
mod <- fitbatmix(x, method = "bayes",  Q = 10)

plot_batmix_sample(x, mod$mcmc_sample, dens_darkness = 5)

keesmulder/flexcircmix documentation built on May 29, 2019, 3:02 a.m.