Skip to contents

This function creates a plot of the cumulative distribution function (CDF) of a ddf distribution.

Usage

plot_cdf(
  dist,
  xlab = "x",
  ylab = "P[X ≤ x]",
  col = "deepskyblue3",
  main = NULL,
  sub = NULL
)

Arguments

dist

A ddf object, the distribution.

xlab

The label for the \(x\)-axis.

ylab

The label for the \(y\)-axis.

col

The color for the points of the plot.

main

An overall title of the plot.

sub

A subtitle for the plot.

Value

A ggplot object displaying the CDF of the given distribution.

Details

For further details on the cumulative density function, you may consult cdf().

See also

Other plotting functions: plot,ddf,missing-method, plot_pmf()

Examples

# Plot the CDF of a binomial distribution
plot_cdf(bin(20, 0.8))