Learn R Programming

bReeze (version 0.1-0)

plotAvailability: Plot availability

Description

Plots daily availability from an availability object in a calendar plot.

Usage

plotAvailability(avail, set, ...)

Arguments

avail
Availability object created by availability.
set
Number of dataset to plot as integer value (optional).
...
Optional graphical parameters, see below for details.

encoding

UTF-8

Optional graphical parameters

The following graphical parameters can optionally be added to customize the plot:
  • col: Vector of three colours, where the first indicates 'full availability', the second 'partial availability' and the third 'not available'.
  • border: Colour of the cell borders -- default value isblack.
  • cex: Numeric value, giving the amount by which text on the plot should be scaled relative to the default (which is 1).

See Also

availability

Examples

Run this code
# 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])
set3 <- createSet(height=20, v.avg=winddata[,10])
ts <- formatTS(winddata[,1])
neubuerg <- createMast(time.stamp=ts, loc=NULL, desc=NULL, set1, set2, set3)
neubuerg <- clean(neubuerg)

# calculate availability
neubuerg.avail <- availability(neubuerg)

# plot availability
plotAvailability(neubuerg.avail)
plotAvailability(avail=neubuerg.avail, set=2)	# one dataset

# change colours, borders and text size
plotAvailability(avail=neubuerg.avail, col=c("green", "yellow", "red"))
plotAvailability(avail=neubuerg.avail, set=1, border="white", cex=1.2)

Run the code above in your browser using DataLab