CircleHistogram {SpatialVx}R Documentation

Circular Histogram

Description

Make a circle histogram, also known as a wind-rose diagram.

Usage

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, ...)

Arguments

wspd

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.

wdir

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.

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, topo.colors.

scale.factor

numeric determining the line widths (scaled against the bin sizes), only used if varwidth is TRUE.

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 is NULL.

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 leg is FALSE.

verbose

logical telling whether or not to print information to the screen.

...

optional arguments to the plot or text functions.

Details

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.

Value

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.

Author(s)

Matt Pocernich

See Also

bearing

Examples

set.seed( 1001 )
wdir <- runif( 1000, 0, 360 )
set.seed( 2002 )
wspd <- rgamma( 1000, 15 )
CircleHistogram( wspd = wspd, wdir = wdir, leg = TRUE )


[Package SpatialVx version 1.0-2 Index]