plotradarlmr: Plot L-moment Radar Plot (Chart) Graphic

plotradarlmrR Documentation

Plot L-moment Radar Plot (Chart) Graphic

Description

Plot a L-moment radar plots (charts). This graphic is somewhat experimental and of unknown application benefit as no known precedent seems available. L-moment ratio diagrams (plotlmrdia) are incredibly useful but have generally been restricted to the 2-D domain. The graphic supported here attempts to provide a visualization of \tau_r for an arbitrary (r-2) > 3 number of axes in the form of a radar plot. The angle of the axes is uninformative but the order of the axes is for \tau_r for r = 3, 4, \cdots. The radar plot is essentially a line graph but mapped to a circular space at the expense of more ink being used. The radar plot is primarily intended to be a mechansim in lmomco for which similarity between other radar plots or presence of outlier combinations of \tau_r can be judged when seen amongst various samples.

Usage

plotradarlmr(lmom, num.axis=4, plot=TRUE, points=FALSE, poly=TRUE, tag=NA,
             title="L-moment Ratio Radar Plot", make.zero.axis=FALSE,
             minrat=NULL, maxrat=NULL, theomins=TRUE, rot=0,
             labadj=1.2, lengthadj=1.75, offsetadj=0.25, scaleadj=2.2,
     axis.control  = list(col=1, lty=2, lwd=0.5, axis.cex=0.75, lab.cex=0.95),
     point.control = list(col=8, lwd=0.5, pch=16),
     poly.control  = list(col=rgb(0,0,0,.1), border=1, lty=1, lwd=1), ...)

Arguments

lmom

L-moment object such as from lmoms.

num.axis

The number of axes. Some error trapping in axis count relative to the length of the \tau_r in lmom is made.

plot

A logical controlling whether R function plot will be called.

points

A logical controlling whether the points of defined by the \tau_r in lmom.

poly

A logical controlling whether the polygon of defined by the \tau_r in lmom.

tag

A text tag plotted at the center of the plot. An NA will result in nothing being plotted.

title

The title of the plot. An NA will result in nothing being plotted.

make.zero.axis

A logical controlling whether polygon will be “faked in” like as if \tau_r having all zeros are provided. This feature is to act as a mechanism to overlay only the zero axis such as might be needed when a lot of other material has been already been drawn on the plot.

minrat

A vector of the minimum values for the \tau_r axes in case the user desired to have some zoomability. The default is all -1 values, and a scalar for minrat will be repeated for the num.axis.

maxrat

A vector of the maximum values for the \tau_r axes in case the user desired to have some zoomability. The default is all +1 values, and a scalar for maxrat will be repeated for the num.axis.

theomins

The are some basic and fundamental lower limits other than -1 that if used provide for a better relative scaling of the axes on the plot. If TRUE, then some select overwritting of potential user-provided minrat is provided.

rot

The basic rotational offset for the angle of the first (\tau_3) axis.

labadj

An adjustment multiplier to help positions of the axis titles.

lengthadj

An adjustment multiplier characterize axis length.

offsetadj

An adjustment to help set the empty space in the middle of the plot for the tag.

scaleadj

An adjustment multiplier to help set the parent domain of the underlying (but hidden) x-y plot called by the R function plot.

axis.control

A specially built and not error trapped R list to hold the control elements of the axes.

point.control

A specially built and not error trapped R list to hold the control elements for plotting of the points if points=TRUE.

poly.control

A specially built and not error trapped R list to hold the control elements for plotting of the polygon if poly=TRUE.

...

Additional arguments passed on to the R function text function for the title and tag. This argument is largely not intended for general use, unlike most idioms of ... in R, but is provided at the release of this function to help developers and avoid future backwards compatibility problems.

Note

This function has many implicit flexible features. The example below attempts to be reasonably comprehensive. Note that in the example that it is required to continue “knowing” what minrat and maxrat where used with plot=TRUE.

Author(s)

W.H. Asquith

See Also

plotlmrdia

Examples

## Not run: 
plotradarlmr(NULL, minrat=-0.6, maxrat=0.6, tag="2 GEVs") # create the plot base
gev  <- vec2par(c(1230,123,-.24), type="gev") # set first parent distribution
poly <- list(col=NA, border=rgb(0,0,1,.1))    # set up polygon handling (blue)
for(i in 1:100) { # perform 100 simulations of the GEV with a sample of size 36
   plotradarlmr(lmoms(rlmomco(36,gev), nmom=6), plot=FALSE,
                poly.control=poly, minrat=-0.6, maxrat=0.6)
}
poly <- list(col=NA, border=4, lwd=3) # set up parent polygon
plotradarlmr(theoLmoms(gev, nmom=6), plot=FALSE,
             poly.control=poly, minrat=-0.6, maxrat=0.6) # draw the parent
 gev <- vec2par(c(450,1323,.5), type="gev") # set second parent distribution
poly <- list(col=NA, border=rgb(0,1,0,.1))  # set up polygon handling (green)
for(i in 1:100) { # perform 100 simulations of the GEV with a sample of size 36
   plotradarlmr(lmoms(rlmomco(36,gev), nmom=6), plot=FALSE,
                poly.control=poly, minrat=-0.6, maxrat=0.6) # draw the parent
}
poly <- list(col=NA, border=3, lwd=3) # set up parent polygon
plotradarlmr(theoLmoms(gev, nmom=6), plot=FALSE,
             poly.control=poly, minrat=-0.6, maxrat=0.6)
poly <- list(col=NA, border=6, lty=1, lwd=2) # make the zeros purple to standout.
plotradarlmr(NULL, make.zero.axis=TRUE, plot=FALSE,
             poly.control=poly, minrat=-0.6, maxrat=0.6) # 
## End(Not run)

lmomco documentation built on May 29, 2024, 10:06 a.m.