Learn R Programming

bReeze (version 0.1-0)

plotDay: Plot diurnal wind speed

Description

Plots the diurnal variation of wind speed or wind direction.

Usage

plotDay(mast, set, signal=c("v", "dir"), ...)

Arguments

mast
Met mast object created by createMast.
set
Set used for plotting as integer value. Argument is optional -- if missing, all sets containing the choosen signal are used.
signal
Signal to be plotted. One of "v" (wind speed) or "dir" (wind direction).
...
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 for each set plotted.
  • lty: Vector of line types, one for each set plotted. Seeparfor available line types.
  • lwd: Vector of line widths, one for each set plotted. Seeparfor usage.
  • cex: Numeric value, giving the amount by which text on the plot should be scaled relative to the default (which is 1).

Details

plotDay reveals diurnal variations of wind speed or wind direction. If wind speeds are usually low with high peaks only during a short period of time each day, problems with grid stability could arise. The plot may also show outliers that indicate data inconsistancy.

See Also

createMast

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)

# plot all datasets
plotDay(neubuerg, signal="v")
plotDay(neubuerg, signal="dir")

# plot one dataset
plotDay(neubuerg, set=1, signal="v")
plotDay(neubuerg, set=2, signal="dir")

# customize plot
plotDay(neubuerg, set=2, signal="v", 
	col=1, lwd=2.5, cex=1.5)
plotDay(neubuerg, signal="dir", 
	col="brown", lwd=3, lty=c(2,3))
plotDay(neubuerg, signal="dir", 
	col=c("darkgray", "lightgray"), lwd=c(3,2), lty=3)

Run the code above in your browser using DataLab