rvn_annual_quantiles_plot {RavenR}R Documentation

Plot of Annual Median, Upper and Lower Quantiles of Flow

Description

Creates a plot of the annual flow quantiles provided by the rvn_annual_quantiles function.

Usage

rvn_annual_quantiles_plot(
  qdat,
  mediancolor = "black",
  ribboncolor = "grey60",
  ribbonalpha = 0.5,
  explot = NULL
)

Arguments

qdat

Time series object generated by rvn_annual_quantiles

mediancolor

Color for the median line

ribboncolor

Color for the lower/upper quantile ribbon

ribbonalpha

Transparency of lower/upper quantile ribbon

explot

Existing ggplot object to which median line and quantile ribbon should be added

Value

p1 ggplot object of quantiles plot

Author(s)

Leland Scantlebury, leland@scantle.com

Examples

system.file("extdata","run1_Hydrographs.csv", package="RavenR") %>%
rvn_hyd_read(.) %>%
rvn_hyd_extract(subs="Sub36",.) ->
hyd_data

# Calculate quantiles for the simulated hydrograph
qdat <- rvn_annual_quantiles(hyd_data$sim)
head(qdat)

# Plot
p <- rvn_annual_quantiles_plot(qdat)
p  # view plot

# Add a second hydrograph to compare
qdat_sim <- rvn_annual_quantiles(hyd_data$sim)

p1 <- rvn_annual_quantiles_plot(qdat_sim, mediancolor = 'blue', ribboncolor = 'red', explot = p)
p1 # view plot


[Package RavenR version 2.2.2 Index]