gr_plot_hori {grwat} | R Documentation |
Horizon hydrograph plot
Description
A convenient wrapper around ggHoriPlot::geom_horizon()
to visualize multiple river hydrographs at once.
Usage
gr_plot_hori(df, years, pal = "Blues", rev = TRUE, scale = 6, print = TRUE)
Arguments
df |
|
years |
Integer vector of years to be plotted. |
pal |
Numeric or character string. Color palette identifier passed to |
rev |
Boolean. Reverse the palette? Defaults to |
scale |
Numeric scale factor passed to |
print |
Boolean. Print plot? Defaults to |
Value
ggplot2
object representing multiple river hydrographs at once using the horizon plot approach
Examples
if (require("ggHoriPlot") && require("ggthemes")) {
library(grwat)
data(spas) # example Spas-Zagorye data is included with grwat package
# separate
sep = gr_separate(spas, params = gr_get_params(reg = 'center'))
# horizon plot for selected years
gr_plot_hori(sep, years = 1960:1980)
}
[Package grwat version 0.0.4 Index]