View source: R/curve.circular.R
curve.circular | R Documentation |
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.
## 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, ...)
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 |
For now, curve circular draws functions defined in radians, counterclockwise coordinate and zero at 0.
A list with information on the plot: zero, rotation and next.points.
Claudio Agostinelli
lines.circular
and circle.control
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.