Description Usage Arguments Details Optional graphical parameters Author(s) References See Also Examples
View source: R/turb.iec.plot.R
Plots the turbulence intensity and site classification after IEC.
1 2 |
mast |
Met mast object created by |
set |
Set used for plotting specified as set number or set name. |
subset |
Optional start and end time stamp for a data subset, as string vector |
... |
Optional graphical parameters, see below for details. |
The IEC defines wind turbine classes by wind speed and turbulence characteristics. In terms of turbulence intensity three reference values (at 15 m/s) are defined:
Turbulence class | Reference value |
A | 0.16 |
B | 0.14 |
C | 0.12 |
plotTurbIEC
plots these IEC references together with the sites values to allow for a classification.
See turbulence
for a definition of turbulence intensity.
The following graphical parameters can optionally be added to customize the plot:
border
: Colour, used for the border around the bars – default is "white"
.
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 is 1
), 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
: Colour, used to fill the bars.
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 (if bty
) – 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 of 0
(always parallel to the axis, default), 1
(always horizontal), 2
(always perpendicular to the axis), 3
(always vertical).
legend
: If TRUE
(the default) a legend is drawn.
leg.text
: A character or expression
vector to appear in the legend.
line
: Vector of three colours – one for each IEC turbulence class.
lty
: Vector of three line types – one for each IEC turbulence class. See par
for available line types.
lwd
: Vector of three line widths – one for each IEC turbulence class. See par
for 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 (only for plots with one dataset) – default is c(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 is c(2.2, 0.7, 0)
.
pos.leg
: Position of legend – one of "bottomright"
, "bottom"
, "bottomleft"
, "left"
, "topleft"
, "top"
, "topright"
, "right"
or "center"
. Use NULL
to hide the legend.
space
: Numeric value between 0 and 1, giving the space left before each bar. Default space is 0.2
.
xlab
: Alternative label for the x axis.
ylab
: Alternative label for the y axis.
xlim
: Limits of the x axis, as vector of two values.
ylim
: Limits of the y axis, as vector of two values.
x.intersp
: Horizontal interspacing factor for legend text, as numeric – default is 0.4
.
y.intersp
: Vertical interspacing factor for legend text, as numeric – default is 0.8
.
Christian Graul
International Electrotechnical Commission (2005) IEC 61400-1 Wind Turbines – Part 1: Design Requirements. IEC Standard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Not run:
# load and prepare data
data("winddata", package="bReeze")
set40 <- set(height=40, v.avg=winddata[,2], v.std=winddata[,5])
set30 <- set(height=30, v.avg=winddata[,6], v.std=winddata[,9])
set20 <- set(height=20, v.avg=winddata[,10], v.std=winddata[,13])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set40, set30, set20)
neubuerg <- clean(mast=neubuerg)
# plot
turb.iec.plot(mast=neubuerg, set=1)
turb.iec.plot(mast=neubuerg, set="set1") # same as above
# data subsets
turb.iec.plot(mast=neubuerg, set=1,
subset=c("2009-12-01 00:00:00", "2009-12-31 23:50:00"))
turb.iec.plot(mast=neubuerg, set=1,
subset=c("2010-01-01 00:00:00", NA)) # just 'start' time stamp
turb.iec.plot(mast=neubuerg, set=1,
subset=c(NA, "2009-12-31 23:50:00")) # just 'end' time stamp
# customize plot
turb.iec.plot(mast=neubuerg, set=1, bty="l", cex.axis=0.8, cex.lab=0.9,
cex.leg=0.7, col.axis="darkblue", col.box="lightblue", col.lab=
"darkblue", col.leg="darkblue", col.ticks="darkblue", las=0,
leg.text=c("IEC class A", "IEC class B", "IEC class C", "measured"),
mar=c(3,3,0.5,0.5), mgp=c(1.8,0.5,0), pos.leg="top", xlab="v [m/s]",
ylab="ti [-]", xlim=c(0,25), ylim=c(0,0.5), x.intersp=1, y.intersp=1)
# customize bars
turb.iec.plot(mast=neubuerg, set=1, col="gray", border="black", space=0.6)
# customize lines
turb.iec.plot(mast=neubuerg, set=1, line=gray(1:3 / 10), lty=2:4,
lwd=0.5:2.5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.