ch_polar_plot_peaks {CSHShydRology} | R Documentation |
Polar / circular plots of peak flows
Description
Polar / circular plots of peak flows. Creates a polar plot of flow peaks in one of several different forms. Basic plot has shading for nival and pluvial centroids.
Usage
ch_polar_plot_peaks(
title = NA,
direction = NULL,
regularity = NULL,
days = NULL,
shading = FALSE,
shade = 35,
pt_col = "darkblue",
in_pch = NULL,
in_cex = NULL,
in_col = NULL,
in_detail = NULL,
labels = NULL,
label_pos = NULL,
out_pch = 16,
out_cex = 0.8,
...
)
Arguments
title |
a title to be added to the plot |
direction |
a value or array of mean/median direction, circular mean or median of points from ch_circ_mean_reg (optional) |
regularity |
a value or array of regularity from ch_circ_mean_reg (optional). |
days |
an array of days of year to be plotted on perimeter (optional). |
shading |
if |
shade |
percentage of shading, default is 35. |
pt_col |
colour used for points for events. default = "darkblue". If pt_col is an array it is used to colour the individual points of days |
in_pch |
a value or an array of symbols to be used for centroids. To be in color, must be one of 21 to 25 to get a symbol with border, elsewise a red symbol is plotted. |
in_cex |
an array of symbol sizes |
in_col |
an array of colors, either numbers or names to apply to centroid points (optional, default is "red") |
in_detail |
an array of indices indicating symbol [1] shape, [2] colour, [3] background, and [4]size |
labels |
an array of labels to be placed beside points with direction and regularity (optional) |
label_pos |
an array of positions indicating when label be placed (1, 2, 3, or 4 - below, left, above, right)(optional - default is below) |
out_pch |
symbols for points on outside of circle |
out_cex |
point size for symbol |
... |
other plot options |
Value
Creates a circular plot of peak flows.
Note
points inside the plot
in_pch, in_col, and in_cex will normally be of the same length and that would be the maximum index of in_detail
points on the outside
Author(s)
Paul Whitfield
References
Pewsey, A., M. Neuhauser, and G. D. Ruxton. 2014. Circular Statistics in R, 192 pp., Oxford University Press.
Whitfield, P. H. 2018. Clustering of seasonal events: A simulation study using circular methods. Communications in Statistics - Simulation and Computation 47(10): 3008-3030.
Burn, D. H., and P. H. Whitfield. 2023. Changes in the timing of flood events resulting from climate change. Journal of Hydrology.
Examples
# base plot
ch_polar_plot_peaks()
#base plot with area shading
ch_polar_plot_peaks(shading = TRUE)
# plot of annual maximum series
data(CAN05AA008)
am <- ch_sh_get_amax(CAN05AA008)
ch_polar_plot_peaks(days = am$doy, title = "05AA008")
#remove partial years
am <-am[am$days >= 365,]
ch_polar_plot_peaks(days = am$doy, title = "05AA008")
#plot the centroid
m_r <- ch_circ_mean_reg(am)
ch_polar_plot_peaks(direction = m_r$mean, regularity = m_r$regularity, title = "05AA008")
# plot peaks and centroid
ch_polar_plot_peaks(days = am$doy, direction = m_r$mean, regularity = m_r$regularity,
title = "05AA008")