Learn R Programming

bReeze (version 0.1-0)

plotFrequency: Plot frequency data

Description

Plots joint probability of wind speeds and directions from a frequency object in a rose plot.

Usage

plotFrequency(freq, ...)

Arguments

freq
Frequency object created by frequency.
...
Optional graphical parameters, see below for details.

encoding

UTF-8

Optional graphical parameters

The following graphical parameters can optionally be added to customize the plot:
  • col: Vector of colours -- one colour for each wind speed bin or a single colour iffrequencyonly contains the total frequency per direction sector.
  • cex: Numeric value, giving the amount by which text on the plot should be scaled relative to the default (which is 1).

See Also

frequency

Examples

Run this code
# load and prepare data
data(winddata)
set40 <- createSet(height=40, v.avg=winddata[,2], dir.avg=winddata[,14])
set30 <- createSet(height=30, v.avg=winddata[,6], dir.avg=winddata[,16])
set20 <- createSet(height=20, v.avg=winddata[,10])
ts <- formatTS(winddata[,1])
neubuerg <- createMast(time.stamp=ts, loc=NULL, desc=NULL, 
	set40, set30, set20)
neubuerg <- clean(neubuerg)

# calculate frequency
neubuerg.freq <- frequency(neubuerg, 1)
neubuerg.freq.2 <- frequency(neubuerg, 1, bins=NULL)

# plot frequency
plotFrequency(neubuerg.freq)
plotFrequency(neubuerg.freq.2)

# customize plot
plotFrequency(neubuerg.freq, col=rainbow(5))
plotFrequency(neubuerg.freq.2, col=gray(0.4), cex=1.5)

Run the code above in your browser using DataLab