PlotVectors {CircSpatial} | R Documentation |
PlotVectors plots vector-spatial data as unit vectors, vectors, or triangle icons with or without jittering. Triangle icons have area proportional to vector magnitude. Jittering can be help clarify structure when vectors overlap.
PlotVectors(x, y, h, v, UnitVector=TRUE, TriIcon=FALSE, AdjArrowLength=1, AdjHeadLength=1, TriIconAdj=1, TriRatio=4, JitterPlot=FALSE, Jitter=1, ...)
x |
Vector of x coordinates |
y |
Vector of y coordinates |
h |
Vector of horizontal component |
v |
Vector of vertical comonent |
UnitVector |
TRUE or FALSE, see Details |
TriIcon |
TRUE or FALSE, see Details |
AdjArrowLength |
Arrow length multiplier |
AdjHeadLength |
Arrow head length multiplier |
TriIconAdj |
Multiplies size of icons |
TriRatio |
Length to width ratio of triangle icon |
JitterPlot |
If TRUE add jitter to location coordinates |
Jitter |
Amount of jitter=Jitter x runif value |
... |
Additional parameters for plotting |
Section J.11 in Appendices.J.PackageDocumentation in the installed folder doc provides
additional detail and illustrations.
Missing values are permitted in h and/or v. u=v=0 are filted and not plotted.
UnitVector | TriIcon | Plot Output |
FALSE | FALSE | Direction and magnitude as variable length arrow |
TRUE | FALSE | Direction as constant length arrow |
FALSE | TRUE | Triangle icons with area proportional to magnitude |
TRUE | TRUE | Direction as constant length arrow |
Plot of vector-spatial data. No values are returned.
Excessive jitter can mask directional structure. The arrow.plot function produces warning
messages about zero-length vectors for non-zero vectors.
Bill Morphet
Ware, C. (2004), Information Visualization, 2nd ed., Morgan Kauffman, San Francisco,
p. 201-205.
data(OceanWind) wind.1997.Jan <- OceanWind[OceanWind$year>1997 & OceanWind$year<1997.1, -1] ## Direction Only PlotVectors(x=wind.1997.Jan$x, y=wind.1997.Jan$y, h=wind.1997.Jan$u, v=wind.1997.Jan$v, UnitVector=TRUE, AdjArrowLength=0.75, AdjHeadLength=0.75, xlim=c(320,350), ylim=c(0,30)) ## Direction and Magnitude PlotVectors(x=wind.1997.Jan$x, y=wind.1997.Jan$y, h=wind.1997.Jan$u, v=wind.1997.Jan$v, UnitVector=FALSE, TriIcon=FALSE, AdjArrowLength=3, AdjHeadLength=0.4, xlim=c(320,350), ylim=c(0,30)) ## Triangle Icons PlotVectors(x=wind.1997.Jan$x, y=wind.1997.Jan$y, h=wind.1997.Jan$u, v=wind.1997.Jan$v, UnitVector=FALSE, TriIcon=TRUE, TriIconAdj=0.25, TriRatio=4, xlim=c(320,350), ylim=c(0,30))