# load and prepare data
data(winddata)
set1 <- createSet(height=40, v.avg=winddata[,2], dir.avg=winddata[,14])
set2 <- createSet(height=30, v.avg=winddata[,6], dir.avg=winddata[,16])
ts <- formatTS(time.stamp=winddata[,1])
neubuerg <- createMast(time.stamp=ts, set1, set2)
neubuerg <- clean(mast=neubuerg)
nb.wp <- profile(mast=neubuerg, v.set=c(1, 2), dir.set=1,
print=FALSE)
pw.56 <- readPC(file="PowerWind_56_900kW.wtg")
nb.aep <- aep(profile=nb.wp, pc=pw.56, hub.h=71, print=FALSE)
# calculate uncertainty
nb.uc <- uncertainty(nb.aep, uc.values=c(5, 10, 5, 5),
uc.names=c("wind measurement", "long term data",
"flow model", "power curve"))
# probability of exceedance plot
plotUncertainty(uncertainty=nb.uc)
# change highlighted P-values
plotUncertainty(uncertainty=nb.uc, p.values=c(50, 95))
# change colours, line types, line width and text size
plotUncertainty(uncertainty=nb.uc, col="blue", lty=c(1, 2, 3, 4),
lwd=2, cex=1.2)
# freaky
plotUncertainty(uncertainty=nb.uc, bty="l", bty.leg="o", cex.axis=2,
cex.lab=0.5, cex.leg=0.8, col=c(5, 10, 15, 20), col.axis="sienna",
col.box="purple", col.lab="plum", col.leg="orchid", col.ticks="gold",
las=0, lty=c(8, 7, 6, 5), lwd=c(5, 3, 1, 0.5), mar=c(6, 5, 4, 3),
mgp=c(4, 2, 1), pos.leg="bottomleft", xlim=c(0.1, 0.9), ylim=c(1000, 2000),
x.intersp=2, y.intersp=1.5)
# uncertainty overview plot
plotUncertainty(uncertainty=nb.uc, type="uncert")
# change colours and border
plotUncertainty(uncertainty=nb.uc, type="uncert",
col="red", border="red4")
plotUncertainty(uncertainty=nb.uc, type="uncert",
col=c(gray(0.7), gray(0.5)), border=c(gray(0.6), gray(0.4)))
plotUncertainty(uncertainty=nb.uc, type="uncert",
col=c(5:1), border=c(1:5))
# change text size, space and margin
plotUncertainty(uncertainty=nb.uc, type="uncert",
cex=1.5, space=0.1, mar=c(1, 13, 1, 1))
# freaky
plotUncertainty(uncertainty=nb.uc, type="uncert",
border=c(11, 22, 33, 44, 55), cex.axis=0.7, cex.text=2,
col=c("maroon", "navy", "thistle", "rosybrown", "papayawhip"),
col.axis="pink3", col.text="seagreen", mar=c(3, 8, 2, 1),
mgp=c(0, 1, 2), space=1)
Run the code above in your browser using DataLab