# load sample hydrograph data, two years worth of sim/obs
ff <- system.file("extdata/run1_Hydrographs.csv", package="RavenR")
run1 <- rvn_hyd_read(ff)
sim <- run1$hyd$Sub36
obs <- run1$hyd$Sub36_obs
# default with moving average smoothing shading of winter months
rvn_flow_residuals(sim,obs)$plot
# plot with more smoothing than the default 3
rvn_flow_residuals(sim, obs, ma_smooth=10)$plot
# with zero line and winter shading
rvn_flow_residuals(sim,obs, add_line=TRUE, winter_shading = TRUE)$plot
# change winter shading to Nov 1 - April 30
rvn_flow_residuals(sim,obs, add_line=TRUE,
winter_shading = TRUE, wsdates=c(11,1,4,30))$plot
Run the code above in your browser using DataLab