rose.diag {circular} | R Documentation |
Creates a rose diagram of a circular data set on the current graphics device.
rose.diag(x, pch = 16, axes = TRUE, shrink = 1, bins, ticks = TRUE, tcl = 0.025, col, tol = 0.04, uin, xlim = c(-1, 1), ylim = c(-1, 1), prop = 1, main = NULL, ...)
x |
a vector, matrix or data.frame. The object is coerced to class circular . |
pch |
point character to use. See help on par . |
axes |
logical: if TRUE axes are plotted according to properties of x . |
shrink |
parameter that controls the size of the plotted circle. Default is 1. Larger values shrink the circle, while smaller values enlarge the circle. |
bins |
if stack==TRUE , bins is the number of arcs to partition the circle with. |
ticks |
logical: if TRUE ticks are plotted according to the
value of bins . |
tcl |
length of the ticks. |
col |
color of the points. The values are recycled if needed. |
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. |
prop |
numerical constant determining the radii of the sectors. By default, prop = 1. |
main |
title of the plot. |
... |
futher parameters passed to plot.default . |
The circumference of the circle is split into groups, the number of groups specified by bins. For each group, a sector is drawn. The radii of the sectors are by default equal to the square root of the relative frequencies of observations in each group. This ensures that the area of the sector is proportional to the group frequency. The length of the radii can be controlled by varying the parameter prop.
a list with information on the plot: zero, rotation and next.points.
some codes from eqscplot
in MASS is used.
Claudio Agostinelli and Ulric Lund
# Generate uniform data and create several rose diagrams. # Some optional parameters may be needed to optimize plots. x <- circular(runif(50, 0, 2*pi)) rose.diag(x, bins = 18, main = 'Uniform Data') points(x) # Generate von Mises data and create several rose diagrams. x <- rvonmises(n=25, mu=0, kappa=5, zero=pi/4) y <- rose.diag(x, bins=18) # Points fall out of bounds. points(x, plot.info=y, stack=TRUE) y <- rose.diag(x, bins=36, prop=1.5, shrink=1.5) # Adjust optional parameters to fit all points on plot. points(x, plot.info=y, stack=TRUE)