norm_cdf_plot: Make a nice example plot for a normal cumulative distribution...

View source: R/norm_density_plot.R

norm_cdf_plotR Documentation

Make a nice example plot for a normal cumulative distribution function

Description

Make a nice example plot for a normal cumulative distribution function

Usage

norm_cdf_plot(
  x_1,
  pop_mean = 0,
  pop_sd = 1,
  xmin = NULL,
  xmax = NULL,
  len = 1000,
  fill_cdf = rgb(0, 0.3, 0.8, 0.25),
  digits = 2,
  lty_density = 2,
  x_lab = "x",
  y_lab = "f(x)",
  title_fmt = "x: %1$s\nquantile: %2$s"
)

Arguments

x_1

x-values to plot

pop_mean

mean of the normal distribution to plot

pop_sd

standard deviation of the normal distribution to plot

xmin

minimum x value for the plot

xmax

maximum x value for the plot

len

number of points to calculate for the curve

fill_cdf

Color to fill the density area

digits

the number of siginifcant digits to display in the title

lty_density

the line type for the density curve

x_lab

label for the x-axis

y_lab

label for the y-axis

title_fmt

The format string, to be passed to sprintf() for the title

Value

A ggplot object


michaelfrancenelson/mfn.teaching.utils documentation built on Oct. 7, 2022, 1:13 a.m.