plot.regression.circular: Plot circular regression

View source: R/plot.regression.circular.R

plot.regression.circularR Documentation

Plot circular regression

Description

The plot method for regression.circular objects.

Usage

## S3 method for class 'regression.circular'
plot(x, plot.type=c("circle", "line"), points.plot=FALSE, rp.type="p", type="l",
line.col=1, points.col="grey", points.pch=1, xlim=NULL, ylim=NULL,
radial.lim=NULL, xlab=NULL, ylab=NULL, labels=NULL, label.pos=NULL, units=NULL,
zero=NULL, clockwise=NULL, main=NULL, ...)

Arguments

x

An object of class regression.circular.

plot.type

Type of the plot: "line": linear plot, "circle": circular plot.

points.plot

Logical; if TRUE original data are added to the plot.

rp.type, type

Character indicating the type of plotting. Default type="l" and rp.type="p".

line.col

Color code or name.

points.col

Color code or name for the original data. Used if points.plot=TRUE.

points.pch

Plotting 'character', i.e., symbol to use for the original data. Used if points.plot=TRUE.

xlim, ylim

The ranges to be encompassed by the x and y axes. Used if plot.type="line".

radial.lim

The range of the grid circle, used if plot.type="circle".

xlab, ylab

Titles for the x axis and y axis, respectively.

labels

Character or expression vector of labels to be placed at the label.pos. label.pos must also be supplied.

label.pos

Vector indicating the position (between 0 and ) at which the labels are to be drawn.

units

Units measure used in the plot. If NULL the value is taken from the attribute of object 'x' from the argument 'x', i.e. x$x.

zero

Where to place the starting (zero) point, i.e. the zero of the plot. If NULL the value is taken from the attribute of object 'x' from the argument 'x', i.e. x$x

clockwise

Logical, indicating the sense of rotation of the plot: clockwise if TRUE and counterclockwise if FALSE. If NULL the value is taken from the attribute of object 'x' from the argument 'x', i.e. x$x

main

An overall title for the plot.

...

Further arguments to be passed to plot.default (if plot.type="line") or to to radial.plot (if codeplot.type="circle" and x is the output of kern.reg.circ.lin) or to lines3d (if plot.type="circle") and x is the output of kern.reg.circ.circ).

Value

If plot.type="circle" and x is the output of kern.reg.circ.lin), this function returns a list with information on the plot: zero, clockwise and radial.lim.

Author(s)

Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal

References

Oliveira, M., Crujeiras R.M. and Rodriguez–Casal, A. (2014) NPCirc: an R package for nonparametric circular methods. Journal of Statistical Software, 61(9), 1–26. https://www.jstatsoft.org/v61/i09/

See Also

kern.reg.circ.lin, kern.reg.circ.circ, kern.reg.lin.circ, lines.regression.circular

Examples

set.seed(1012)
n <- 100
x <- runif(100, 0, 2*pi)
y <- sin(x)+0.5*rnorm(n)
estNW<-kern.reg.circ.lin(circular(x),y,t=NULL,bw=10,method="NW")
plot(estNW, plot.type="line", points.plot=TRUE)
plot(estNW, plot.type="circle", points.plot=TRUE)

NPCirc documentation built on Nov. 10, 2022, 5:48 p.m.