Description Usage Arguments Examples
Plots a distribution function. For a discrete distribution a needle plot (mass) or an stepwise
function (distributiion, quantile) is used. For a continuous distribution simple lines
are used. Since internally points
and lines
is used, the further drawing parameters
relate to that.
1 2 3 |
x |
distribution function object |
add |
logical: add to current plot (default: add=F) |
xlim |
range: plotting area (default: NULL) |
ylim |
range: plotting area (default: NULL) |
cex.lettering |
numeric: magnification size for fonts used (default: 1) |
n |
numeric: number of points used to draw the curve (default: 201) |
... |
further drawing parameter, e.g color etc. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Standard normal distribution (continuous)
# density
d <- distrFunc("norm")
plot(d)
# distribution
d <- distrFunc("norm", func="p")
plot(d)
# quantile
d <- distrFunc("norm", func="q")
plot(d)
## Geometric distribution (continuous)
# density
d <- distrFunc("geom", prob=0.5)
plot(d)
# distribution
d <- distrFunc("geom", prob=0.5, func="p")
plot(d)
# quantile
d <- distrFunc("geom", prob=0.5, func="q")
plot(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.