energy
object.plotEnergy(energy, show.total=TRUE, ...)
plen(energy, show.total=TRUE, ...)
energy
.TRUE
, the total amount of wind energy per square meter is shown.border.leg
: Border colour(s) for the legend. One colour for each wind speed bin or a single colour -- default is same ascol
.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.circles
: Manual definition of circles to be drawn, as numeric vector of the form c(inner circle, outer circle, interval between the circles).col
: Vector of colours -- one colour for each wind speed bin or a single colour ifenergy
only contains the total energy per direction sector.col.axis
: Colour to be used for axis annotations -- default is"gray45"
.col.border
: Colour to be used for sector borders -- default isNULL
(no border is drawn).col.circle
: Colour to be used for circles -- default is"gray45"
.col.cross
: Colour to be used for axis lines -- default is"gray45"
.col.lab
: Colour to be used for axis labels -- default is"black"
.col.leg
: Colour to be used for legend text -- default is"black"
.fg
: IfTRUE
, sectors are plotted in foreground (on top of axis lines and circles) -- default isFALSE
.lty.circle
: Line type of circles -- default is"dashed"
. Seepar
for available line types.lty.cross
: Line type of axis lines -- default is"solid"
. Seepar
for available line types.lwd.border
: Line width of the sector borders -- default is0.5
. Only used ifcol.border
is set.lwd.circle
: Line width of circles, as numeric value -- default is0.7
.lwd.cross
: Line width of axis lines, as numeric value -- default is0.7
.pos.axis
: Position of axis labels in degree, as numeric value -- default is60
.sec.space
: Space between plotted sectors, as numeric value between0
and1
-- default is0.2
.title.leg
: Alternative legend title, as string.width.leg
: Widths of legend space relative to plot space, as numeric value between0
and1
. If0
, the legend is omitted, default value is0.15
.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.4
.energy
# 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(time.stamp=winddata[,1])
neubuerg <- createMast(time.stamp=ts, set40, set30, set20)
neubuerg <- clean(mast=neubuerg)
# calculate energy
neubuerg.wb <- weibull(mast=neubuerg, v.set=1, print=FALSE)
neubuerg.e <- energy(wb=neubuerg.wb, print=FALSE)
neubuerg.e.2 <- energy(wb=neubuerg.wb, bins=NULL, print=FALSE) # no binning
# plot energy rose
plotEnergy(energy=neubuerg.e)
plotEnergy(energy=neubuerg.e.2)
# omit total amount
plotEnergy(energy=neubuerg.e, show.total=FALSE)
# change colours
plotEnergy(energy=neubuerg.e, col=gray(5:0 / 5.5))
# change text sizes
plotEnergy(energy=neubuerg.e, cex=0.8)
# manual definition of circles
plotEnergy(energy=neubuerg.e, circles=c(100, 500, 100))
# plot sectors in foreground
plotEnergy(energy=neubuerg.e, fg=TRUE)
# change position of axis labels
plotEnergy(energy=neubuerg.e, pos.axis=135)
# no legend
plotEnergy(energy=neubuerg.e, width.leg=0)
# freaky
plotEnergy(energy=neubuerg.e, border.leg=heat.colors(5), bty.leg="o",
cex.axis=0.5, cex.lab=2, cex.leg=0.5, circles=c(80, 800, 80),
col=rainbow(5), col.axis="green", col.border="orange",
col.circle="purple", col.cross="yellow", col.lab="pink",
col.leg="lightblue", fg=TRUE, lwd.border=2, lwd.circle=3, lwd.cross=4,
lty.circle="52168319", lty.cross="12223242", sec.space=0.6,
title.leg="* WiNd SpEeD *", x.intersp=2, y.intersp=5)
Run the code above in your browser using DataLab