EVPlotAdd | R Documentation |
Functionality to add extra lines or points to an extreme value plot (derived from the EVPlot function).
EVPlotAdd(
Pars,
dist = "GenLog",
Name = "Adjusted",
MED = NULL,
xyleg = NULL,
col = "red",
lty = 1,
pts = NULL,
ptSym = NULL
)
Pars |
a numeric vector of length two. The first is the Lcv (linear coefficient of variation) and the second is the Lskew (linear skewness). |
dist |
distribution name with a choice of "GenLog", "GEV", "GenPareto", "Kappa3", and "Gumbel" |
Name |
character string. User chosen name for points or line added (for the legend) |
MED |
The two year return level. Necessary In the case where the EV plot is not scaled |
xyleg |
a numeric vector of length two. They are the x and y position of the symbol and text to be added to the legend. |
col |
The colour of the points of line that have been added |
lty |
An integer. The type of line added |
pts |
A numeric vector. An annual maximum sample, for example. This is for points to be added |
ptSym |
An integer. The symbol of the points to be added |
A line can be added using the Lcv and Lskew based on one of four distributions (Generalised extreme value, Generalised logistic, Gumbel, Generalised Pareto). Points can be added as a numeric vector. If a single point is required, the base points() function can be used and the x axis will need to be log(RP-1).
Additional, user specified line or points to an extreme value plot derived from the EVPlot function.
Anthony Hammond
#Get an AMAX sample and plot the growth curve with the GEV distribution
AM.203018 <- GetAM(203018)
EVPlot(AM.203018$Flow, dist = "GEV")
#Now add a line (dotted & red) for the generalised logistic distribution
#first get the Lcv and Lskew using the LMoments function
pars <- as.numeric(LMoments(AM.203018[,2])[c(5,6)])
EVPlotAdd(Pars = pars, dist = "GenLog", Name = "GenLog", xyleg = c(-5.2,2.65), lty = 3)
#Now add a line for the gumbel distribution which is darkgreen and dashed.
EVPlotAdd(Pars = pars[1], dist = "Gumbel", Name = "Gumbel",
xyleg = c(-5.19,2.5), lty = 3, col = "darkgreen")
#now plot afresh and get another AMAX and add the points
EVPlot(AM.203018$Flow, dist = "GEV")
AM.27090 <- GetAM(27090)
EVPlotAdd(xyleg = c(-4.9,2.65), pts = AM.27090[,2], Name = "27090")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.