Learn R Programming

bReeze (version 0.1-0)

plotEnergy: Plot wind energy rose

Description

Plots a wind energy rose from an energy object.

Usage

plotEnergy(energy, show.total=TRUE, ...)

Arguments

energy
Energy object created by energy.
show.total
If TRUE, the total amount of wind energy per square meter is shown.
...
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 ifenergyonly contains the total energy 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

energy

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 energy
neubuerg.wb <- weibull(neubuerg, 1)
neubuerg.e <- energy(neubuerg.wb)
neubuerg.e.2 <- energy(neubuerg.wb, bins=NULL)	# no binning

# plot energy rose
plotEnergy(neubuerg.e)
plotEnergy(neubuerg.e.2)

# omit total amount
plotEnergy(neubuerg.e, show.total=FALSE)

# change colour and text size
plotEnergy(neubuerg.e, col=gray(4:1 / 5), cex=0.9)
plotEnergy(neubuerg.e.2, col="limegreen", cex=1.3)

Run the code above in your browser using DataLab