View source: R/norm_density_plot.R
norm_density_plot | R Documentation |
Make a nice plot of a normal PDF
norm_density_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 = paste0("x = %1$s\n", "probability density (height of the curve at x) = %2$s\n", "cumulative density (area of shaded region) = %3$s") )
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 |
A ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.