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, ...)
A plot is produced. If assigned to an object, then a list object is returned with the components:
a list object giving the histogram information for each petal.
numeric giving the number of observations.
numeric giving the number of zero wspd and missing values.
numeric vector of length n
giving the magnitudes for the histograms (i.e., the petal colors). For example, with MODE output, one might use the centroid distances between the paired objects, or the Baddeley Delta metric, or whatever other attribute is of interest. The argument is called wspd
because in the original context of windrose graphs, the windspeed was used for the petal colors.
numeric vector of length n
giving the angles (from the north) between two matched objects. In the original context of a windrose diagram, the direction from the north of the wind. See bearing
for a way to obtain such vectors.
numeric giving the number of petals to use.
logical if TRUE the angles displayed are radians, if FALSE degrees.
vector defining the colors to be used for the petals. See, for example, topo.colors
.
numeric determining the line widths (scaled against the bin sizes), only used if varwidth
is TRUE.
logical determining whether to vary the widths of the petals or not.
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).
numeric giving the bin width.
character string giving the title to add to the plot.
numeric only used if max.perc
is NULL.
numeric giving the maximum percentage to show
logical determining whether or not to add a legend to the plot.
character string giving the units for use with the legend. Not used if leg
is FALSE.
logical telling whether or not to print information to the screen.
optional arguments to the plot
or text
functions.
Matt Pocernich
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.
bearing
set.seed( 1001 )
wdir <- runif( 1000, 0, 360 )
set.seed( 2002 )
wspd <- rgamma( 1000, 15 )
CircleHistogram( wspd = wspd, wdir = wdir, leg = TRUE )
Run the code above in your browser using DataLab