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

autoplot.distribution

Plot a distribution


Description

[Deprecated]

Usage

## S3 method for class 'distribution'
autoplot(
  x,
  type = c("pdf", "cdf"),
  n = 100,
  quantile_range = c(0.001, 0.999),
  ...
)

Arguments

x

The distribution(s) to plot.

type

The type of plot to make (must be either "pdf" or "cdf").

n

The resolution (number of points) used to display the distribution.

quantile_range

The range of the distribution (specified as quantiles).

...

Unused.

Details

Visualise distribution(s) by plotting its probability density function (density()) or cumulative distribution function (cdf()). Note: This function currently only works for continuous distributions.

Examples

library(ggplot2)
dist <- c(dist_normal(mu = 0, sigma = 1), dist_student_t(df = 3))
autoplot(dist, type = "pdf")
autoplot(dist, type = "cdf")

distributional

Vectorised Probability Distributions

v0.2.2
GPL-3
Authors
Mitchell O'Hara-Wild [aut, cre] (<https://orcid.org/0000-0001-6729-7695>), Earo Wang [ctb] (<https://orcid.org/0000-0001-6448-5260>), Matthew Kay [ctb] (<https://orcid.org/0000-0001-9446-0419>), Alex Hayes [aut] (<https://orcid.org/0000-0002-4985-5160>)
Initial release

We don't support your browser anymore

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