number of groups to partition the circle with. This will be the number of petals or sectors in the rose diagram.
main
title of plot. Default is no title.
prop
numerical constant determining the radii of the sectors. By default, prop = 1.
pts
logical value. If TRUE, points will be stacked on the circumference of the circle, according to bins - one point for each observation. The default value is FALSE, no points plotted.
cex
size of points, if pts = TRUE. By default, cex = 1. See help on cex in help section for par.
pch
if pts = TRUE, pch determines the character used. See help on pch in help section for par.
dotsep
constant used to specify the distance between stacked points, if pts = TRUE. Default is 40; larger values will create smaller spaces, while smaller values create larger spaces. This option can be useful when pch is other than 1, or when shrink is other than 1 (see below).
shrink
parameter that controls the size of the plotted circle. Default is 1. Larger values shrink the circle, while smaller values enlarge the circle. This option can be useful when pts = TRUE.
Details
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.
Value
NULL
Note
A rose diagram is plotted on the current graphics device.
See Also
circ.plot
Examples
# Generate uniform data and create several rose diagrams.
# Some optional parameters may be needed to optimize plots.
data <- runif(50, 0, 2*pi)
rose.diag(data, bins = 18, main = 'Uniform Data')
rose.diag(data, bins = 18, main = 'Stacked Points', pts=TRUE)
# Generate von Mises data and create several rose diagrams.
data <- rvm(25, 0, 5)
rose.diag(data, bins=18, pts=TRUE) # Points fall out of bounds.
rose.diag(data, bins=36, prop=1.5, pts=TRUE, shrink=1.5)
# Adjust optional parameters to fit all points on plot.
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(CircStats)
Loading required package: MASS
Loading required package: boot
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/CircStats/rose.diag.Rd_%03d_medium.png", width=480, height=480)
> ### Name: rose.diag
> ### Title: Rose Diagram
> ### Aliases: rose.diag
> ### Keywords: hplot
>
> ### ** Examples
>
> # Generate uniform data and create several rose diagrams.
> # Some optional parameters may be needed to optimize plots.
> data <- runif(50, 0, 2*pi)
> rose.diag(data, bins = 18, main = 'Uniform Data')
> rose.diag(data, bins = 18, main = 'Stacked Points', pts=TRUE)
> # Generate von Mises data and create several rose diagrams.
> data <- rvm(25, 0, 5)
> rose.diag(data, bins=18, pts=TRUE) # Points fall out of bounds.
> rose.diag(data, bins=36, prop=1.5, pts=TRUE, shrink=1.5)
> # Adjust optional parameters to fit all points on plot.
>
>
>
>
>
> dev.off()
null device
1
>