The plot method for regression.circular objects.
# S3 method for 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, ...)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.
An object of class regression.circular.
Type of the plot: "line": linear plot, "circle": circular plot.
Logical; if TRUE original data are added to the plot.
Character indicating the type of plotting. Default type="l" and rp.type="p".
Color code or name.
Color code or name for the original data. Used if points.plot=TRUE.
Plotting 'character', i.e., symbol to use for the original data. Used if points.plot=TRUE.
The ranges to be encompassed by the x and y axes. Used if plot.type="line".
The range of the grid circle, used if plot.type="circle".
Titles for the x axis and y axis, respectively.
Character or expression vector of labels to be placed at the label.pos. label.pos must also be supplied.
Vector indicating the position (between \(0\) and \(2\pi\)) at which the labels are to be drawn.
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.
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
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
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).
Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez--Casal
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/
kern.reg.circ.lin, kern.reg.circ.circ, kern.reg.lin.circ, lines.regression.circular
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)
Run the code above in your browser using DataLab