gr_plot_vars {grwat} | R Documentation |
Plot interannual hydrograph variable changes
Description
This function plots the hydrograph separation variables produced by gr_summarize()
. Different background fill colors and line types are used to differentiate seasons and variable types.
Usage
gr_plot_vars(
df,
...,
tests = NULL,
exclude = NULL,
smooth = TRUE,
layout = as.matrix(1),
pagebreak = FALSE,
print = TRUE
)
Arguments
df |
|
... |
Quoted sequence of variable names. |
tests |
|
exclude |
Integer vector of years to be excluded from plotting. |
smooth |
Logical. If |
layout |
|
pagebreak |
Logical. Whether to break page between plots ( |
print |
Boolean. Print plot? Defaults to |
Value
list
of ggplot2
objects, one for each variable, representing its interannual changes
Examples
library(grwat)
data(spas) # example Spas-Zagorye data is included with grwat package
# separate
sep = gr_separate(spas, params = gr_get_params(reg = 'center'))
# summarize from 1965 to 1990
vars = gr_summarize(sep, 1965, 1990)
# plot one selected variable
gr_plot_vars(vars, Qygr)
# plot two variables sequentially
gr_plot_vars(vars, D10w1, Wsprngr)
# four variables in matrix layout with tests calculated on the fly
gr_plot_vars(vars, Qspmax, Qygr, D10w1, Wsprngr,
layout = matrix(1:4, nrow = 2, byrow = TRUE),
tests = TRUE)