plotradarlmr | R Documentation |
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.
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), ...)
lmom |
L-moment object such as from |
num.axis |
The number of axes. Some error trapping in axis count relative to the length of the |
plot |
A logical controlling whether R function |
points |
A logical controlling whether the points of defined by the |
poly |
A logical controlling whether the polygon of defined by the |
tag |
A text tag plotted at the center of the plot. An |
title |
The title of the plot. An |
make.zero.axis |
A logical controlling whether polygon will be “faked in” like as if |
minrat |
A vector of the minimum values for the |
maxrat |
A vector of the maximum values for the |
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 |
rot |
The basic rotational offset for the angle of the first ( |
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 |
scaleadj |
An adjustment multiplier to help set the parent domain of the underlying (but hidden) x-y plot called by the R function |
axis.control |
A specially built and not error trapped R |
point.control |
A specially built and not error trapped R |
poly.control |
A specially built and not error trapped R |
... |
Additional arguments passed on to the R function |
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
.
W.H. Asquith
plotlmrdia
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.