Learn R Programming

circular (version 0.1)

plot.density.circular: Plot Method for Kernel Density Estimation for Circular Data

Description

The plot method for density.circular objects.

Usage

## S3 method for class 'density.circular':
plot(x, main = NULL, xlab = NULL, ylab = "Density circular", type = "l", zero.line = TRUE, points.plot = FALSE, points.col = 1, points.pch = 1, plot.type = c("circle", "line"), axes = TRUE, ticks = TRUE, bins, shrink = 1, tcl = 0.025, tol = 0.04, uin, xlim = c(-1, 1), ylim = c(-1, 1), ...)

Arguments

x
an object of class density.circular.
main, xlab, ylab, type
plotting parameters with useful defaults.
zero.line
logical; if TRUE, add a base line at $y = 0$. Used when plot.type is "line".
points.plot
logical; if TRUE original data are added to the plot.
points.col, points.pch
parameters used to draw the points.
plot.type
type of the plot.
axes
logical; if TRUE axis are drawn.
ticks
logical; if TRUE ticks are drawn.
bins
number of ticks to plot.
shrink
parameter that controls the size of the plotted circle. Default is 1. Larger values shrink the circle, while smaller values enlarge the circle.
tcl
length of the ticks.
tol
proportion of white space at the margins of plot
uin
desired values for the units per inch parameter. If of length 1, the desired units per inch on the x axis.
xlim, ylim
the ranges to be encompassed by the x and y axes. Useful for centering the plot.
...
futher parameters passed to plot.default.

Value

  • None.

See Also

density.circular and lines.density.circular

Examples

Run this code
x <- rvonmises(n=100, mu=pi, kappa=2)
res25 <- density(x, bw=25)
plot(res25, points.plot=TRUE, xlim=c(-1.5,1))
res50 <- density(x, bw=25, adjust=2)
lines(res50, col=2)

Run the code above in your browser using DataLab