plot_trim | R Documentation |
Plot summary of a trimmed distribution: pdf + cdf + quantile + random
plot_trim(
d,
trim = c(-Inf, Inf),
doTrunc = FALSE,
xgrid = quantile_trim(d, seq(0.001, 0.999, length.out = 1000)),
pgrid = seq(0.001, 0.999, length.out = 1000),
nsim = 200,
line.size = 1,
line.colour = "black",
area.fill = "salmon",
area.alpha = 0.5,
point.colour = "black",
point.size = 2,
lab.size = 12,
txt.size = 4
)
d |
distributions3 object |
trim |
Numeric vector of size 2, trimming bounds. |
doTrunc |
Logical, do truncation? default FALSE, i.e. rectification is used. |
xgrid |
Numeric vector, x-values where pdf and cdf are evaluated |
pgrid |
Numeric vector in (0,1), probabilities where quantile function is evaluated |
nsim |
Integer, number of simulated values |
line.size, line.colour, area.fill, area.alpha, point.colour, point.size, lab.size, txt.size, |
graphical parameters |
a ggplot object.
# Define Normal distribution
norm <- Normal(mu=0.75,sigma=0.5)
plot_trim(norm)
plot_trim(norm,trim=c(0,1))
plot_trim(norm,trim=c(0,1),doTrunc=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.