screen.frames {FlowScreen} | R Documentation |
Plot one or more frames from the summary screening plot
Description
This function plots one or more frames (i.e. time series plot) from any of the three plot.screening summary plots at a time. It can be used to create custom summary plots - see the example code.
Usage
screen.frames(metrics, type = "h", element = NULL, language = "English",
StnInfo = NULL, mmar = c(3, 4, 0.5, 0.5), text = "d", multi = F,
xaxis = T)
Arguments
metrics |
output from |
type |
Character string indicating the set of metrics to plot. Options are "h" for high flow metrics, "l" for low flow metrics, or "b" for baseflow metrics. |
element |
Numeric index(es) (1-10) of the frame(s) to plot, see details of this function for the list of metrics for each category (high, low, baseflow). Each category has ten different metrics that can be plotted individually. Default is NULL, which creates individual plots for all ten metrics. A list of elements c(1, 5, 10) can be specified or a range c(1:5). |
language |
Language for plot labels. Choice of either "English" or "French". Default is "English". |
StnInfo |
Optional data.frame containing user-supplied station info for plot.
data.frame must have 7 columns containing station info in the following order:
Station ID, Station Name, Prov/State, Country, Latitude, Longitude, Catchment Area
If any of the information is unavailabe, fill with NA. The Station ID column must
match the Station ID in column 1 of the data.frame input from |
mmar |
Numeric vector specifying plot margins. Default is c(3,4,0.5,0.5) |
text |
Character string containing text for margin. This can be set to NULL if no
margin text is wanted, or set to "d" to use default text containing the station ID, station
name, and the prov/state output from |
multi |
Boolean indicating whether the function is being used to create one plot in a multi-plot layout. Default is F. If T, suppresses the reset of plot parameter settings. This plot function will only work for a multi-plot layout if text=F |
xaxis |
Boolean indicating whether to plot an x-axis. Default = T. |
Details
High flow metrics include:
Annual Maximum Series
Annual Maximum Day of Year
Peaks Over Threshold (Qmax)
Inter-Event Duration
Q80
Q90
Day of Year 25 percent Annual Flow
Center of Volume
Day of Year 75 percent Annual Flow
Duration between 25 percent and 75 percent Annual Flow
Low flow metrics include:
Q10
Q25
Drought Start
Drought Center
Drought End
Drought Duration
Drought Severity
Annual Minimum Flow
Mean Annual Minimum 7-day Flow
Mean Annual Minimum 10-day Flow
Baseflow metrics include:
Mean Daily Discharge
Annual Baseflow Volume
Annual Mean Baseflow
Annual Maximum Baseflow
Annual Minimum Baseflow
Mean Annual Baseflow Index
Day of Year 25 percent Baseflow Volume
Center of Volume Baseflow
Day of Year 75 percent Baseflow Volume
Duration between 25 percent and 75 percent Baseflow Volume
Author(s)
Jennifer Dierauer and Paul Whitfield
Examples
# load results from metrics.all function for the Caniapiscau River
data(caniapiscau.res)
caniapiscau.ts <- caniapiscau.res$indata
# plot one frame from the baseflow screening plot
screen.frames(caniapiscau.res, type="b", element=1)
# plot three frames from the low flow screening plot
screen.frames(caniapiscau.res, type="l", element=c(1:3))
# create a custom summary plot
opar <- par(no.readonly = TRUE)
layout(matrix(c(1,2,3,4), 2, 2, byrow=TRUE))
par(oma=c(0,0,3,0))
stninfo <- station.info(caniapiscau.ts, Plot=TRUE)
screen.frames(caniapiscau.res, type="h", element=1, text=NULL, multi=TRUE)
screen.frames(caniapiscau.res, type="l", element=1, text=NULL, multi=TRUE)
screen.frames(caniapiscau.res, type="b", element=1, text=NULL, multi=TRUE)
mtext(paste("Station ID: ", caniapiscau.ts[1,1], ", Agency: WSC, Country: CA", sep=""),
side=3, line=1, outer=TRUE, cex=0.9)
par <- opar
layout(1,1,1)
# or plot everything!
opar <- par(no.readonly = TRUE)
layout(matrix(c(1:30), 5, 6, byrow=TRUE))
screen.frames(caniapiscau.res, type="h", text=NULL, multi=TRUE)
screen.frames(caniapiscau.res, type="l", text=NULL, multi=TRUE)
screen.frames(caniapiscau.res, type="b", text=NULL, multi=TRUE)
par <- opar
layout(1,1,1)