curve.circular: Draw Function Plots in a Circle

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/curve.circular.R

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

1
2
3
4
5
6
7
8
9
## 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, or alternatively the name of a function which will be plotted.

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 TRUE add to already existing plot.

axes

logical: if TRUE axis are added to the plot.

ticks

logical: if TRUE tick - marks are added to the 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.

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 plot.default in order to draw the circle. The function circle.control is used to set the parameters.

...

parameters, passed to lines.circular.

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

1
2
3
4
5
6
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))

circular documentation built on May 1, 2019, 7:57 p.m.