gr_plot_ridge {grwat} | R Documentation |
Ridgeline hydrograph plot
Description
A convenient wrapper around ggridges::geom_ridgeline()
to visualize multiple river hydrographs at once.
Usage
gr_plot_ridge(
df,
years,
pal = 4,
rev = FALSE,
scale = 0.01,
alpha = 0.8,
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 |
alpha |
Numeric opacity value of the ridgeline plot. Defaults to |
print |
Boolean. Print plot? Defaults to |
Value
ggplot2
object representing the multiple river hydrographs at once using the ridgeline plot approach
Examples
if (require("ggridges")) {
library(grwat)
data(spas) # example Spas-Zagorye data is included with grwat package
# separate
sep = gr_separate(spas, params = gr_get_params(reg = 'center'))
# ridgline plot for selected years
gr_plot_ridge(sep, years = c(1960, 1965, 1989, 2001, 2012))
}
[Package grwat version 0.0.4 Index]