if (FALSE) {
# load and prepare data
data("winddata", package="bReeze")
set40 <- set(height=40, v.avg=winddata[,2], dir.avg=winddata[,14])
set30 <- set(height=30, v.avg=winddata[,6], dir.avg=winddata[,16])
set20 <- set(height=20, v.avg=winddata[,10])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set40, set30, set20)
neubuerg <- clean(mast=neubuerg)
# plot all datasets
day.plot(mast=neubuerg, signal="v.avg")
day.plot(mast=neubuerg, signal="dir.avg")
# plot one dataset
day.plot(mast=neubuerg, set=1, signal="v.avg")
day.plot(mast=neubuerg, set="set1", signal="v.avg") # same as above
day.plot(mast=neubuerg, set=2, signal="dir.avg")
# sectoral plot
day.plot(mast=neubuerg, set=1, signal="v.avg", num.sectors=8)
# data subsets
day.plot(mast=neubuerg, signal="v.avg",
subset=c("2009-12-01 00:00:00", "2009-12-31 23:50:00"))
day.plot(mast=neubuerg, signal="v.avg",
subset=c("2010-01-01 00:00:00", NA)) # just 'start' time stamp
day.plot(mast=neubuerg, set=1, signal="v.avg", num.sectors=4,
subset=c(NA, "2009-12-31 23:50:00")) # just 'end' time stamp
# customize plot
day.plot(mast=neubuerg, signal="v.avg",
bty="l", cex.axis=0.8, cex.lab=0.9, cex.leg=0.7,
col=c("darkgreen", "royalblue", "purple"), col.axis="darkgray",
col.box="darkgray", col.lab="darkgray", col.leg="darkgray",
col.ticks="darkgray", las=2, lty=c(2,3,4), lwd=1.5, mar=c(3, 3, 0.5, 0.5),
mgp=c(1.5, 0.5, 0), pos.leg="topleft", xlab="hour", ylab="velocity",
ylim=c(3.5,6), x.intersp=1, y.intersp=1)
}
Run the code above in your browser using DataLab