gr_plot_sep | R Documentation |
The function plots river hydrograph by filling the different flow types using colors. Matrix layouts can be used if multiple plots are needed. Temperature and precipitation can be overlaid.
gr_plot_sep(
df,
years = NULL,
layout = as.matrix(1),
pagebreak = FALSE,
temp = FALSE,
prec = FALSE,
span = 5,
print = TRUE
)
df |
|
years |
Integer vector of years to be plotted. |
layout |
|
pagebreak |
Logical. Whether to break page between plots (used by |
temp |
Boolean. Add temperature curve to the plot? Defaults to |
prec |
Boolean. Add precipitation curve to the plot? Defaults to |
span |
Integer number of days to accumulate precipitation for plotting. |
print |
Boolean. Print plot? Defaults to |
list
of ggplot2
objects, one for each year, representing the hydrograph separation
library(grwat)
data(spas) # example Spas-Zagorye data is included with grwat package
# separate
sep = gr_separate(spas, params = gr_get_params(reg = 'center'))
# One year
gr_plot_sep(sep, 1978)
# Two years
gr_plot_sep(sep, c(1978, 1989))
# Two years in a matrix layout
gr_plot_sep(sep, 1988:1989, layout = matrix(1:2, nrow = 2, byrow = TRUE))
# Add temperature and precipitation
gr_plot_sep(sep, 1991, temp = TRUE, prec = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.