| plot.wateres_series | R Documentation |
Plots time series of chosen water balance variables for the reservoir, by using the ggplot2 package.
## S3 method for class 'wateres_series'
plot(x, reser, type = "flow", begin = 1,
end = nrow(x), filename = NULL, width = 8, height = 6, ...)
x |
A |
reser |
A corresponding |
type |
A type of variables to be plotted: “storage”, “level” or “flow” which plots all of the remaining variables. |
begin |
A time step to begin the plot. |
end |
A time step to end the plot. |
filename |
A file name where the plot will be saved. If not specified, the plot will be printed to the current device. |
width |
Plot width in inches (or a unit specified by the |
height |
Plot height in inches (or a unit specified by the |
... |
Further arguments passed to the |
Series of flows with all values equal to zero are ignored.
An error occurs if length of the time series of results (x) does not equal to the length of the reservoir data (reser).
A ggplot object.
calc_series.wateres used for calculation of reservoir time series
reser = data.frame(
Q = c(0.078, 0.065, 0.168, 0.711, 0.154, 0.107, 0.068, 0.057, 0.07, 0.485, 0.252, 0.236,
0.498, 0.248, 0.547, 0.197, 0.283, 0.191, 0.104, 0.067, 0.046, 0.161, 0.16, 0.094),
DTM = seq(as.Date("2000-01-01"), by = "months", length.out = 24))
reser = as.wateres(reser, storage = 14.4e6, area = 754e3)
plot(calc_series(reser, 14.4e6, 0.14), reser)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.