rose {tectonicr} | R Documentation |
Rose Diagram
Description
Plots a rose diagram (rose of directions), the analogue of a histogram or density plot for angular data.
Usage
rose(
x,
weights = NULL,
binwidth = NULL,
bins = NULL,
axial = TRUE,
equal_area = TRUE,
clockwise = TRUE,
muci = TRUE,
round_binwidth = 0,
mtext = "N",
main = NULL,
sub = NULL,
at = seq(0, 360 - 45, 45),
col = "grey",
dots = FALSE,
dot_pch = 1,
dot_cex = 1,
dot_col = "grey",
...
)
Arguments
x |
Data to be plotted. A numeric vector containing angles (in degrees). |
weights |
Optional vector of numeric weights associated with x. |
binwidth |
The width of the bins (in degrees). |
bins |
number of arcs to partition the circle width.
Overridden by |
axial |
Logical. Whether data are uniaxial ( |
equal_area |
Logical. Whether the radii of the bins are proportional to
the frequencies ( |
clockwise |
Logical. Whether angles increase in the
clockwise direction ( |
muci |
logical. Whether the mean and its 95% CI are added to the plot or not. |
round_binwidth |
integer. Number of decimal places of bin width (0 by default). |
mtext |
character. String to be drawn at the top margin of the plot
( |
main , sub |
Character string specifying the title and subtitle of the
plot. If |
at |
Optional vector of angles at which tick marks should be plotted.
Set |
col |
fill color of bins |
dots |
logical. Whether a circular dot plot should be added
( |
dot_cex , dot_pch , dot_col |
Plotting arguments for circular dot plot |
... |
Additional arguments passed to |
Value
A window (class "owin"
) containing the plotted region.
Note
If bins
and binwidth
are NULL
, an optimal bin width will be
calculated using Scott (1979):
w_b = \frac{R}{n^{\frac{1}{3}}}
with n being the length of x
, and the range R being either 180 or 360
degree for axial or directional data, respectively.
If "axial" == TRUE
, the binwidth is adjusted to guarantee symmetrical fans.
Examples
x <- rvm(100, mean = 90, k = 5)
rose(x, axial = FALSE, border = TRUE)
data("san_andreas")
rose(san_andreas$azi, dots = TRUE, main = "dot plot")
rose(san_andreas$azi, weights = 1 / san_andreas$unc, main = "weighted")