View source: R/density.circular.R
plot.density.circular | R Documentation |
The plot
method for density.circular
objects.
## S3 method for class 'density.circular'
plot(x, main=NULL, sub=NULL, xlab=NULL, ylab="Density circular", type="l",
zero.line=TRUE, points.plot=FALSE, points.col=1, points.pch=1,
points.cex=1, plot.type=c("circle", "line"), axes=TRUE, ticks=FALSE,
bins=NULL, offset=1, shrink=1, tcl=0.025, tcl.text = 0.125, sep=0.025, tol=0.04,
digits=2, cex=1, uin=NULL, xlim=NULL, ylim=NULL, join=FALSE, nosort=FALSE,
units=NULL, template=NULL, zero=NULL, rotation=NULL,
control.circle=circle.control(), ...)
x |
an object of class |
main , sub , xlab , ylab , type |
plotting parameters with useful defaults. |
zero.line |
logical; if |
points.plot |
logical; if |
points.col , points.pch , points.cex |
parameters used to draw the points. |
plot.type |
type of the plot: "line": linear plot, "circle": circular plot. |
axes |
logical; if |
ticks |
logical; if |
bins |
number of ticks to plot. |
offset |
the radius of the circle |
shrink |
parameter that controls the size of the plotted function. Default is 1. |
tcl |
length of the ticks. |
tcl.text |
The position of the axis labels. |
sep |
constant used to specify the distance between stacked points. Default is 0.025; smaller values will create smaller spaces. |
tol |
proportion of white space at the margins of plot |
digits |
number of digits used to print axis values. |
cex |
point character size. See help on |
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. |
join |
logical: should the first and the last point joined. |
nosort |
logical: should the data sort before plotting. Defaults is to sort. |
units |
units measure used in the plot. If |
template |
template used in the plot. If |
zero |
position of the zero used in the plot. If |
rotation |
rotation used in the plot. If |
control.circle |
parameters passed to |
... |
further parameters passed to |
A list with information on the plot: zero, rotation and next.points.
Claudio Agostinelli
density.circular
, lines.density.circular
, plot.circular
, lines.circular
and curve.circular
.
set.seed(1234)
x <- rvonmises(n=100, mu=circular(pi), kappa=2)
res25x <- density(x, bw=25)
plot(res25x, points.plot=TRUE, xlim=c(-1.5,1))
res50x <- density(x, bw=25, adjust=2)
lines(res50x, col=2)
resp25x <- plot(res25x, points.plot=TRUE, xlim=c(-1, 1.3), ylim=c(-1.5,1.2),
template="geographics", main="Plotting density estimate for two data set")
y <- rvonmises(n=100, mu=circular(pi/2), kappa=2,
control.circular=list(template="geographics"))
res25y <- density(y, bw=25)
lines(res25y, points.plot=TRUE, plot.info=resp25x, col=2, points.col=2)
plot(res25x, plot.type="line", points.plot=TRUE, xlim=c(-1, 1.3), ylim=c(-1.5,1.2),
template="geographics", main="Plotting density estimate for two data set")
lines(res25y, plot.type="line", points.plot=TRUE, col=2, points.col=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.