Learn R Programming

bReeze (version 0.3-2)

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, ...)
plwbd(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:
  • bty: Type of box to be drawn around the plot region. Allowed values are"o"(the default),"l","7","c","u", or"]". The resulting box resembles the corresponding upper case letter. A value of"n"suppresses the box.
  • bty.leg: Type of box to be drawn around the legend. Allowed values are"n"(no box, the default) and"o".
  • cex: Amount by which text on the plot should be scaled relative to the default (which is1), as numeric. To be used for scaling of all texts at once.
  • cex.axis: Amount by which axis annotations should be scaled, as numeric value.
  • cex.lab: Amount by which axis labels should be scaled, as numeric value.
  • cex.leg: Amount by which legend text should be scaled, as numeric value.
  • 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.
  • col.axis: Colour to be used for axis annotations -- default is"black".
  • col.box: Colour to be used for the box around the plot region (ifbty) -- default is"black".
  • col.lab: Colour to be used for axis labels -- default is"black".
  • col.leg: Colour to be used for legend text -- default is"black".
  • col.ticks: Colours for the axis line and the tick marks respectively -- default is"black".
  • las: Style of axis labels. One of0(always parallel to the axis, default),1(always horizontal),2(always perpendicular to the axis),3(always vertical).
  • lty: Vector of line types, assigned likecol. Seeparfor usage.
  • lwd: Vector of line widths, assigned likecol. Seeparfor usage.
  • mar: A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot -- default isc(4.5, 4.5, 1, 1).
  • mgp: A numerical vector of the form c(label, annotation, line), which gives the margin line for the axis label, axis annotation and axis line. The default isc(2.5, 0.7, 0).
  • pos.leg: Position of legend -- one of"bottomright","bottom","bottomleft","left","topleft","top","topright","right"or"center". UseNULLto hide the legend.
  • xlab: Alternative label for the x axis.
  • ylab: Alternative label for the y axis.
  • xlim: Numeric vector of the x limits of the plot.
  • ylim: Numeric vector of the y limits.
  • x.intersp: Horizontal interspacing factor for legend text, as numeric -- default is0.4.
  • y.intersp: Vertical line distance for legend text, as numeric -- default is0.8.

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(time.stamp=winddata[,1])
neubuerg <- createMast(time.stamp=ts, set1)
neubuerg <- clean(mast=neubuerg)

# calculate Weibull parameters
neubuerg.wb <- weibull(mast=neubuerg, v.set=1, print=FALSE)

# plot
plotWbDir(wb=neubuerg.wb)

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

# customize plot
plotWbDir(wb=neubuerg.wb, bty="l", bty.leg="o", cex.axis=0.8, cex.lab=0.9, 
  cex.leg=0.7, col=c(rainbow(12), gray(0.4)), col.axis=gray(0.2), 
  col.box=gray(0.4), col.lab=gray(0.2), col.leg=gray(0.2), 
  col.ticks=gray(0.2), las=0, lty=c(rep(3, 12), 1), lwd=c(rep(1, 12), 2), 
  mar=c(3,3,0.5,0.5), mgp=c(1.5,0.5,0), pos.leg="right", 
  xlab="velocity [m/s]", ylab="frequency [m/s]", xlim=c(0,15), 
  ylim=c(0,25), x.intersp=1, y.intersp=1)

Run the code above in your browser using DataLab