Learn R Programming

bReeze (version 0.1-0)

plotWbDir: Plot Weibull fit per direction sector

Description

Plots the fitted Weibull distribution per direction sector from a weibull object.

Usage

plotWbDir(wb, show.ak=FALSE, ...)

Arguments

wb
Weibull object created by weibull.
show.ak
If TRUE, the Weibull parameters A and k are added to the legend.
...
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 for the sectoral distributions, with the length of sector number + 1, where the last colour is used for the general profile.
  • lty: Vector of line types, assigned likecol. Seeparfor available line types.
  • lwd: Vector of line widths, assigned likecol. Seeparfor usage.
  • cex: Numeric value, giving the amount by which text on the plot should be scaled relative to the default (which is 1).

See Also

weibull

Examples

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

# calculate Weibull parameters
neubuerg.wb <- weibull(neubuerg, 1)

# plot
plotWbDir(neubuerg.wb)

# show parameters in legend
plotWbDir(neubuerg.wb, show.ak=TRUE)

# customize plot
plotWbDir(neubuerg.wb, col=c(rainbow(12), gray(0.4)), 
	lty=c(rep(3, 12), 1), lwd=c(rep(1, 12), 2), cex=1.2)
plotWbDir(neubuerg.wb, lty=c(2,2,3,3,3,4,4,4,5,5,5,2,1), 
	lwd=rep(1, 12), cex=0.9)

Run the code above in your browser using DataLab