gr_plot_matrix: Runoff matrix plot

View source: R/plot.R

gr_plot_matrixR Documentation

Runoff matrix plot

Description

The function plots runoff values, components and seasons using the matrix-based approach. The X axis corresponds to the day of the year, and the Y axis corresponds to the year. The function is useful when the whole picture of river runoff needs to be assessed.

Usage

gr_plot_matrix(df, years = NULL, type = "runoff", print = TRUE)

Arguments

df

data.frame of hydrograph separation produced by gr_separate().

years

Integer vector of years to be plotted. Defaults to NULL.

type

Character string. Supported options are 'runoff', 'component', and 'season'. Defaults to 'runoff'.

print

Boolean. Print plot? Defaults to TRUE. Use FALSE if you want to tweak the plot aesthetics before plotting.

Value

ggplot2 object representing the runoff values, components or seasons using the matrix-based approach

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'))

# matrix plot for runoff
gr_plot_matrix(sep, type = 'runoff')

# matrix plot for seasons
gr_plot_matrix(sep, type = 'season')

# matrix plot for genetic components
gr_plot_matrix(sep, type = 'component')

grwat documentation built on Nov. 2, 2023, 5:21 p.m.