This is a function to plot an object of class isocir
that is the result of the function CIRE
and cond.test
. It creates a plot of circular data points on the current graphics device. Data points are either plotted as points on the unit circle, or the range of the circle is divided into a specified number of bins, and points are stacked in the bins corresponding to the number of observations in each bin.
# S3 method for isocir
plot(x, option=c("CIRE", "cirmeans"), cex = 1, stack = TRUE,
axes = TRUE, sep = 0.025, shrink = 1, bins = 300, ticks = FALSE,
tcl = 0.025, tcl.text = 0.125, col = NULL, tol = 0.04, uin = NULL,
xlim = c(-1, 1), ylim = c(-1, 1), digits = 2, units = NULL,
template = NULL, zero = NULL, rotation = NULL,
main = NULL, sub=NULL, xlab = "", ylab = "",
control.circle=circle.control(), ...)
A list with information on the plot: zero, rotation and next.points.
an object of class isocir
.
The points that are used in the plot: If CIRE
, the Circular Isotonic Regression Estimator. If cirmeans
, the unrestricted circular means. Default is CIRE
.
point character size. See help on par
.
logical; if TRUE
, points are stacked on the perimeter of the circle. Otherwise, all points are plotted on the perimeter of the circle. Default is TRUE
.
logical; if TRUE
axes are plotted according to properties of x
.
constant used to specify the distance between stacked points,
if stack==TRUE
or in the case of more than one dataset. Default is 0.025; smaller values will create smaller spaces.
parameter that controls the size of the plotted circle. Default is 1. Larger values shrink the circle, while smaller values enlarge the circle.
if stack==TRUE
, bins is the number of arcs to partition the circle with. Default is 300.
logical; if TRUE
ticks are plotted according to the
value of bins
.
length of the ticks.
The position of the axis labels.
color of the points. The values are recycled if needed.
proportion of white space at the margins of plot.
desired values for the units per inch parameter. If of length 1, the desired units per inch on the x axis.
the ranges to be encompassed by the x and y axes. Useful for centering the plot.
number of digits used to print axis values.
title, subtitle, x label and y label of the plot.
the units used in the plot.
the template used in the plot.
the zero used in the plot.
the rotation used in the plot.
parameters passed to plot.default
in order to draw the circle. The function circle.control
is used to set the parameters.
futher parameters passed to points.default
.
Sandra Barragán based on the code of Claudio Agostinelli and Ulric Lund from the package circular.
When there are many closely distributed observations, stacking is
recommended. When stacking the points, if there are many points in a particular bin, it may be necessary to shrink the plot of the circle so that all points fit. This is controlled with the parameter shrink
. Generally the parameter sep
does not need adjustment, however, when shrinking the plot, or for a very large number of observations, it may be helpful.
cond.test
, CIRE
, isocir
.
data(cirdata)
result<-CIRE(cirdata)
plot(result)
plot(result,option="cirmeans")
Run the code above in your browser using DataLab