curve.circular {circular} | R Documentation |
Draw Function Plots in a Circle
Description
Draws a curve corresponding to the given function or expression (in
x
) over the interval [from,to]
in a circle. Mainly used to
plot circular density functions.
Usage
## S3 method for class 'circular'
curve(expr, from=NULL, to=NULL, n=101, add=FALSE,
cex=1, axes=TRUE, ticks=FALSE, shrink=1, tcl=0.025,
tcl.text=0.125, tol=0.04, uin=NULL, xlim=c(-1, 1),
ylim=c(-1, 1), digits=2, modulo=c("2pi", "asis", "pi"),
main=NULL, sub=NULL, xlab="", ylab="",
control.circle=circle.control(), ...)
## S3 method for class 'function.circular'
plot(x, from=0, to=2*pi, ...)
Arguments
expr |
an expression written as a function of |
x |
a ‘vectorizing’ numeric R function. |
from , to |
the range over which the function will be plotted. |
n |
integer; the number of x values at which to evaluate. |
add |
logical; if |
axes |
logical: if |
ticks |
logical: if |
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. |
tcl.text |
The position of the axis labels. |
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. |
digits |
number of digits used to print axis values. |
modulo |
the modulo used to process the data. |
main , sub , xlab , ylab , cex |
graphical parameters. |
control.circle |
parameters passed to |
... |
parameters, passed to |
Details
For now, curve circular draws functions defined in radians, counterclockwise coordinate and zero at 0.
Value
A list with information on the plot: zero, rotation and next.points.
Author(s)
Claudio Agostinelli
See Also
lines.circular
and circle.control
Examples
ff <- function(x) sqrt(x)/20
curve.circular(ff)
curve.circular(ff, to=6*pi, join=FALSE, nosort=TRUE, n=1001, modulo="asis",
shrink=1.2)
plot.function.circular(function(x) dvonmises(x, circular(0), 10), xlim=c(-1, 2.2))