View source: R/CircleHistogram.R
CircleHistogram | R Documentation |
Make a circle histogram, also known as a wind-rose diagram.
CircleHistogram(wspd, wdir, numPetals = 12, radians = FALSE,
COLS = NULL, scale.factor = 3, varwidth = TRUE,
minW = NULL, maxW = NULL, circFr = 10,
main = "Wind Rose", cir.ind = 0.05,
max.perc = NULL, leg = FALSE, units = "units",
verbose = FALSE, ...)
wspd |
numeric vector of length |
wdir |
numeric vector of length |
numPetals |
numeric giving the number of petals to use. |
radians |
logical if TRUE the angles displayed are radians, if FALSE degrees. |
COLS |
vector defining the colors to be used for the petals. See, for example, |
scale.factor |
numeric determining the line widths (scaled against the bin sizes), only used if |
varwidth |
logical determining whether to vary the widths of the petals or not. |
minW , maxW |
single numerics giving the minimum and maximum break ranges for the histogram of each petal. If NULL, it will be computed as min( wspd) and max( wspd). |
circFr |
numeric giving the bin width. |
main |
character string giving the title to add to the plot. |
cir.ind |
numeric only used if |
max.perc |
numeric giving the maximum percentage to show |
leg |
logical determining whether or not to add a legend to the plot. |
units |
character string giving the units for use with the legend. Not used if |
verbose |
logical telling whether or not to print information to the screen. |
... |
optional arguments to the |
The windrose diagram, or circle histogram, is similar to a regular histogram, but adds more information when direction is important. Binned directions are placed in a full circle with frequencies of for each angle shown via the lengths of each pedal. Colors along the pedal show the conditional histogram of another variable along the pedal.
A plot is produced. If assigned to an object, then a list object is returned with the components:
summary |
a list object giving the histogram information for each petal. |
number.obs |
numeric giving the number of observations. |
number.calm |
numeric giving the number of zero wspd and missing values. |
Matt Pocernich
bearing
set.seed( 1001 )
wdir <- runif( 1000, 0, 360 )
set.seed( 2002 )
wspd <- rgamma( 1000, 15 )
CircleHistogram( wspd = wspd, wdir = wdir, leg = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.