Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

draw.density

Draws a density curve


Description

Draws a density curve along one of the sides of the current plotting region.

Usage

## S3 method for class 'density'
draw(object, side=1, height=0.2, offset=0, scale=c("absolute", "relative"), xtrim=NULL,
  xpd=TRUE, ...)

Arguments

side

An integer specifying which side to draw along. See mtext for details.

height

A numeric scalar specifying the "height" of the curve, where height means the maximum height of the density. that is, how much the zero-density position should be shifted.

scale

A character specifying the scale of the curve, which can be either absolute or relative.

xpd

If TRUE, the curve is not clipped, cf. par.

...

Not used.

Value

Returns the drawn 'density' object (with the 'x' and 'y' coordinates as plotted).

Author(s)

Henrik Bengtsson

See Also

See density for estimating densities. Internally *swapXY() may be used.


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.