Description Usage Arguments Details Optional graphical parameters Author(s) See Also Examples
Plots the diurnal variation of wind speed or wind direction.
1 2 |
mast |
Met mast object created by |
set |
Set used for plotting, specified as set number or set name. Argument is optional – if missing, all sets containing the choosen |
dir.set |
Direction set used for sectoral splitting of the data, specified as set number or set name. Argument is used for sectoral plotting only (see |
signal |
Signal to be plotted as string. |
num.sectors |
Number of wind direction sectors as integer value greater 1. Argument is optional – if not |
subset |
Optional start and end time stamp for a data subset, as string vector |
... |
Optional graphical parameters, see below for details. |
plotDay
reveals diurnal variations of a signal. The plot may show outliers that indicate data inconsistancy.
The following graphical parameters can optionally be added to customize the plot:
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
: Vector of colours, one for each set plotted.
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).
lty
: Vector of line types, one for each set plotted. See par
for available line types.
lwd
: Vector of line widths, one for each set plotted. 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 – default is c(4.5, 5, 1.5, 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, 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.
xlab
: Alternative label for the x axis.
ylab
: Alternative label for the y axis.
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 line distance for legend text, as numeric – default is 0.8
.
Christian Graul
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 39 40 | ## Not run:
# 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)
## End(Not run)
|
This is bReeze 0.4-3
Type changes("bReeze") to see changes/bug fixes, help(bReeze) for documentation
or citation("bReeze") for how to cite bReeze.
Attaching package: 'bReeze'
The following objects are masked from 'package:stats':
frequency, ts
The following object is masked from 'package:utils':
timestamp
Pattern found: %d.%m.%Y %H:%M
Cleaning set 1...
2938 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 2...
3361 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 3...
2896 samples lower than 0.4 replaced by 'NA' in average wind speed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.