Deprecated lifecycle

# S3 method for 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")
#> Warning: `autoplot.distribution()` is deprecated as of distributional 0.2.0. #> The autoplot() method for distributions will be replaced by the {ggdist} package in an upcoming release. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
autoplot(dist, type = "cdf")