View source: R/rvn_annual_quantiles_plot.R
rvn_annual_quantiles_plot | R Documentation |
Creates a plot of the annual flow quantiles provided by the rvn_annual_quantiles
function.
rvn_annual_quantiles_plot(
qdat,
mediancolor = "black",
ribboncolor = "grey60",
ribbonalpha = 0.5,
explot = NULL
)
qdat |
Time series object generated by |
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 |
p1 ggplot object of quantiles plot
Leland Scantlebury, leland@scantle.com
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.