Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

autoplot.dist

Autoplot of Distributions Using ggplot2


Description

The function autoplot plots the CDF and PDF of a given distribution object.

Usage

autoplot.dist(x, which = "all", ncols = 2, ...)

Arguments

x

distribution object.

which

whether to plot only CDF, PDF or both, default: 'all'.

ncols

in how many columns should the plots be merged, default: 2.

...

further arguments to be passed.

Details

The function is a wrapper of the internal plotting function plotgg. For more details see plotgg.

Value

ggplot object if which = "cdf" or which = "pdf". If both are plotted, the plots are merged using multiplot() function and a list with both plots is invisibly returned.

See Also

Examples

## Not run: 
N <- normdist()
autoplot(N)

# manipulating cdf plot
B <- binomdist(12, 0.5)
autoplot(-3*B, which = "cdf", xlim1 = c(-30, -10))
# manipulating pdf plot
autoplot(-3*B, which = "pdf", xlim2 = c(-30, -10))

## End(Not run)

mistr

Mixture and Composite Distributions

v0.0.4
GPL-3
Authors
Lukas Sablica [aut, cre] (<https://orcid.org/0000-0001-9166-4563>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.