plot.distrFunc: plot.distrFunc

Description Usage Arguments Examples

View source: R/distrFunc.R

Description

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.

Usage

1
2
3
## S3 method for class 'distrFunc'
plot(x, add = F, xlim = NULL, ylim = NULL,
  cex.lettering = 1, n = 501, ...)

Arguments

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.

Examples

 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)

sigbertklinke/mmstat documentation built on May 14, 2019, 8:36 a.m.