normPlot {berryFunctions} | R Documentation |
Nice plot of normal density distribution
normPlot(
mean = 0,
sd = 1,
width = 3,
lines = TRUE,
quant = TRUE,
fill = addAlpha("blue", c(2:6, 7:2)/10),
cumulative = TRUE,
las = 1,
main = paste("Normal density with\nmean =", signif(mean, 2), "and sd =", signif(sd,
2)),
ylim = lim0(dnorm(mean, mean, sd)),
ylab = "",
xlab = "",
type = "n",
lty = 1,
col = par("fg"),
mar = c(2, 3, 3, 3),
keeppar = FALSE,
...
)
mean |
average value as in |
sd |
standard deviation. DEFAULT: 1 |
width |
distance (in sd) from plot ends to mean. DEFAULT: 3 |
lines |
Should vertical lines be plotted at mean +- n*sd? DEFAULT: TRUE |
quant |
should quantile regions be drawn with |
fill |
color(s) passed to |
cumulative |
Should cumulative density distribution be added? DEFAULT: TRUE |
las |
arguments passed to |
main |
main as in |
ylim |
limit for the y axis. DEFAULT: lim0(y) |
ylab , xlab |
labels for the axes. DEFAULT: "" |
type , lty , col |
arguments passed to |
mar |
margins for plot passed to |
keeppar |
should margin parameters be kept instead of being restored to previous value? DEFAULT: FALSE |
... |
further arguments passed to |
This function finds some nice defaults for very quickly plotting a normal distribution by just specifying mean and sd.
None. Used for plotting.
Berry Boessenkool, berry-b@gmx.de, July 2014
betaPlot
, dnorm
,
https://cran.r-project.org/package=denstrip,
https://cran.r-project.org/view=Distributions
normPlot()
normPlot(81.7, 11.45)
normPlot(180, 11, quant=FALSE, width=2)