The VectorPlot class represents a vector field by drawing arrows at points of a grid.
Header file: ncarg/hlu/VectorPlot.h Class name: vectorPlotClass Class pointer: NhlvectorPlotClass Fortran class function: NHLFVECTORPLOTCLASS Superclass: DataComm Composite classes: LogLinTransformation,IrregularTransformation,PlotManager Data specific class Class name: vectorPlotDataDepClass Class pointer: NhlvectorPlotDataDepClass Fortran class function: NHLFVECTORPLOTDATADEPCLASS Superclass: DataSpec
Type name: NhlTVectorPositionMode Definition: typedef enum _NhlVectorPositionMode { NhlARROWHEAD = 0, /* ArrowHead */ NhlARROWTAIL = 1, /* ArrowTail */ NhlARROWCENTER = 2 /* ArrowCenter */ } NhlVectorPositionMode; Type name: NhlTVectorGlyphStyle Definition: typedef enum _NhlVectorGlyphStyle { NhlLINEARROW = 0, /* LineArrow */ NhlFILLARROW = 1, /* FillArrow */ NhlWINDBARB = 2 /* WindBarb */ } NhlVectorGlyphStyle;
+---------------------------------------------------------------+ | VectorPlot Resource Set | |---------------------------------------------------------------| | NAME TYPE ACCESS | | CLASS DEFAULT | |===============================================================| | vcVectorFieldData NhlTInteger RCSG | | VcVectorFieldData <none> | |---------------------------------------------------------------| | vcScalarFieldData NhlTInteger RCSG | | VcScalarFieldData <none> | |---------------------------------------------------------------| | vcMapDirection NhlTBoolean RCSG | | VcMapDirection True | |---------------------------------------------------------------| | vcPositionMode NhlTVectorPositionMode RCSG | | VcPositionMode "ArrowCenter" | |---------------------------------------------------------------| | vcVectorDrawOrder NhlTDrawOrder RCSG | | VcVectorDrawOrder "Draw" | |---------------------------------------------------------------| | vcGlyphStyle NhlTVectorGlyphStyle RCSG | | VcGlyphStyle "LineArrow" | |---------------------------------------------------------------| | vcMinDistanceF NhlTFloat RCSG | | VcMinDistanceF 0.0 | |---------------------------------------------------------------| | vcMinMagnitudeF NhlTFloat RCSG | | VcMinMagnitudeF 0.0 | |---------------------------------------------------------------| | vcMaxMagnitudeF NhlTFloat RCSG | | VcMaxMagnitudeF 0.0 | |---------------------------------------------------------------| | vcRefMagnitudeF NhlTFloat RCSG | | VcRefMagnitudeF 0.0 | |---------------------------------------------------------------| | vcRefLengthF NhlTFloat RCSG | | VcRefLengthF <dynamic> | |---------------------------------------------------------------| | vcMinFracLengthF NhlTFloat RCSG | | VcMinFracLengthF 0.0 | |---------------------------------------------------------------| | vcLevels NhlTFloatGenArray RCSG | | Levels <dynamic> | |---------------------------------------------------------------| | vcLevelCount NhlTInteger RCSG | | VcLevelCount 16 | |---------------------------------------------------------------| | vcLevelSelectionMode NhlTLevelSelectionMode RCSG | | LevelSelectionMode "AutomaticLevels" | |---------------------------------------------------------------| | vcMaxLevelCount NhlTInteger RCSG | | MaxLevelCount 16 | |---------------------------------------------------------------| | vcLevelSpacingF NhlTFloat RCSG | | LevelSpacingF <dynamic> | |---------------------------------------------------------------| | vcMinLevelValF NhlTFloat RCSG | | MinLevelValF <dynamic> | |---------------------------------------------------------------| | vcMaxLevelValF NhlTFloat RCSG | | MaxLevelValF <dynamic> | |---------------------------------------------------------------| | vcLevelColors NhlTColorIndexGenArray RCSG | | VcLevelColors <dynamic> | |---------------------------------------------------------------| | vcUseScalarArray NhlTBoolean RCSG | | VcUseScalarArray False | |---------------------------------------------------------------| | vcScalarMissingValColor NhlTColorIndex RCSG | | VcScalarMissingValColor "Foreground" | |---------------------------------------------------------------| | vcMonoLineArrowColor NhlTBoolean RCSG | | VcMonoLineArrowColor True | |---------------------------------------------------------------| | vcLineArrowColor NhlTColorIndex RCSG | | LineColor "Foreground" | |---------------------------------------------------------------| | vcLineArrowThicknessF NhlTFloat RCSG | | LineThicknessF 1.0 | |---------------------------------------------------------------| | vcLineArrowHeadMinSizeF NhlTFloat RCSG | | VcLineArrowHeadMinSizeF 0.005 | |---------------------------------------------------------------| | vcLineArrowHeadMaxSizeF NhlTFloat RCSG | | VcLineArrowHeadMaxSizeF 0.05 | |---------------------------------------------------------------| | vcFillArrowsOn NhlTBoolean RCSG | | VcFillArrowsOn False | |---------------------------------------------------------------| | vcMonoFillArrowFillColor NhlTBoolean RCSG | | VcMonoFillArrowFillColor True | |---------------------------------------------------------------| | vcFillArrowFillColor NhlTColorIndex RCSG | | FillColor "Foreground" | |---------------------------------------------------------------| | vcFillOverEdge NhlTBoolean RCSG | | VcFillOverEdge True | |---------------------------------------------------------------| | vcMonoFillArrowEdgeColor NhlTBoolean RCSG | | VcMonoFillArrowEdgeColor True | |---------------------------------------------------------------| | vcFillArrowEdgeColor NhlTColorIndex RCSG | | EdgeColor "Background" | |---------------------------------------------------------------| | vcFillArrowEdgeThicknessF NhlTFloat RCSG | | EdgeThicknessF 2.0 | |---------------------------------------------------------------| | vcFillArrowWidthF NhlTFloat RCSG | | VcFillArrowWidthF 0.1 | |---------------------------------------------------------------| | vcFillArrowMinFracWidthF NhlTFloat RCSG | | VcFillArrowMinFracWidthF 0.25 | |---------------------------------------------------------------| | vcFillArrowHeadXF NhlTFloat RCSG | | VcFillArrowHeadXF 0.36 | |---------------------------------------------------------------| | vcFillArrowHeadMinFracXF NhlTFloat RCSG | | VcFillArrowHeadMinFracXF 0.25 | |---------------------------------------------------------------| | vcFillArrowHeadInteriorXF NhlTFloat RCSG | | VcFillArrowHeadInteriorXF 0.33 | |---------------------------------------------------------------| | vcFillArrowHeadYF NhlTFloat RCSG | | VcFillArrowHeadYF 0.12 | |---------------------------------------------------------------| | vcFillArrowHeadMinFracYF NhlTFloat RCSG | | VcFillArrowHeadMinFracYF 0.25 | |---------------------------------------------------------------| | vcMonoWindBarbColor NhlTBoolean RCSG | | VcMonoWindBarbColor True | |---------------------------------------------------------------| | vcWindBarbColor NhlTColorIndex RCSG | | LineColor "Foreground" | |---------------------------------------------------------------| | vcWindBarbLineThicknessF NhlTFloat RCSG | | LineThicknessF 1.0 | |---------------------------------------------------------------| | vcWindBarbTickAngleF NhlTFloat RCSG | | VcWindBarbTickAngleF 62.0 | |---------------------------------------------------------------| | vcWindBarbTickLengthF NhlTFloat RCSG | | VcWindBarbTickLengthF 0.3 | |---------------------------------------------------------------| | vcWindBarbTickSpacingF NhlTFloat RCSG | | VcWindBarbTickSpacingF 0.125 | |---------------------------------------------------------------| | vcWindBarbCalmCircleSizeF NhlTFloat RCSG | | VcWindBarbCalmCircleSizeF 0.25 | |---------------------------------------------------------------| | vcWindBarbScaleFactorF NhlTFloat RCSG | | VcWindBarbScaleFactorF 1.0 | |---------------------------------------------------------------| | vcUseRefAnnoRes NhlTBoolean RCSG | | VcUseRefAnnoRes False | |---------------------------------------------------------------| | vcRefAnnoOn NhlTBoolean RCSG | | VcRefAnnoOn True | |---------------------------------------------------------------| | vcRefAnnoOrientation NhlTOrientation RCSG | | VcRefAnnoOrientation "Vertical" | |---------------------------------------------------------------| | vcRefAnnoExplicitMagnitudeF NhlTFloat RCSG | | VcRefAnnoExplicitMagnitudeF 0.0 | |---------------------------------------------------------------| | vcRefAnnoArrowLineColor NhlTColorIndex RCSG | | LineColor "Foreground" | |---------------------------------------------------------------| | vcRefAnnoArrowFillColor NhlTColorIndex RCSG | | FillColor "Foreground" | |---------------------------------------------------------------| | vcRefAnnoArrowEdgeColor NhlTColorIndex RCSG | | EdgeColor "Background" | |---------------------------------------------------------------| | vcRefAnnoArrowUseVecColor NhlTBoolean RCSG | | VcRefAnnoArrowUseVecColor True | |---------------------------------------------------------------| | vcRefAnnoArrowAngleF NhlTFloat RCSG | | VcRefAnnoArrowAngleF 0.0 | |---------------------------------------------------------------| | vcRefAnnoArrowSpaceF NhlTFloat RCSG | | VcRefAnnoArrowSpaceF 2.0 | |---------------------------------------------------------------| | vcRefAnnoArrowMinOffsetF NhlTFloat RCSG | | VcRefAnnoArrowMinOffsetF 0.25 | |---------------------------------------------------------------| | vcRefAnnoString1On NhlTBoolean RCSG | | VcRefAnnoString1On True | |---------------------------------------------------------------| | vcRefAnnoString1 NhlTString RCSG | | VcRefAnnoString1 <dynamic> | |---------------------------------------------------------------| | vcRefAnnoString2On NhlTBoolean RCSG | | VcRefAnnoString2On True | |---------------------------------------------------------------| | vcRefAnnoString2 NhlTString RCSG | | VcRefAnnoString2 <dynamic> | |---------------------------------------------------------------| | vcRefAnnoFormat NhlTString RCSG | | NumberFormat "*+^sg" | |---------------------------------------------------------------| | vcRefAnnoFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | vcRefAnnoTextDirection NhlTTextDirection RCSG | | TextDirection "Across" | |---------------------------------------------------------------| | vcRefAnnoFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | vcRefAnnoFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | vcRefAnnoFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | vcRefAnnoFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | vcRefAnnoFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | vcRefAnnoConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | vcRefAnnoAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | vcRefAnnoFuncCode NhlTCharacter RCSG | | TextFuncCode : | |---------------------------------------------------------------| | vcRefAnnoBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | vcRefAnnoPerimOn NhlTBoolean RCSG | | EdgesOn True | |---------------------------------------------------------------| | vcRefAnnoPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | vcRefAnnoPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | vcRefAnnoPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | vcRefAnnoZone NhlTInteger RCSG | | VcRefAnnoZone 4 | |---------------------------------------------------------------| | vcRefAnnoSide NhlTPosition RCSG | | VcRefAnnoSide "Bottom" | |---------------------------------------------------------------| | vcRefAnnoJust NhlTJustification RCSG | | VcRefAnnoJust "TopRight" | |---------------------------------------------------------------| | vcRefAnnoParallelPosF NhlTFloat RCSG | | VcRefAnnoParallelPosF 1.0 | |---------------------------------------------------------------| | vcRefAnnoOrthogonalPosF NhlTFloat RCSG | | VcRefAnnoOrthogonalPosF 0.02 | |---------------------------------------------------------------| | vcMinAnnoOn NhlTBoolean RCSG | | VcMinAnnoOn False | |---------------------------------------------------------------| | vcMinAnnoOrientation NhlTOrientation RCSG | | VcMinAnnoOrientation "Vertical" | |---------------------------------------------------------------| | vcMinAnnoExplicitMagnitudeF NhlTFloat RCSG | | VcMinAnnoExplicitMagnitudeF 0.0 | |---------------------------------------------------------------| | vcMinAnnoArrowLineColor NhlTColorIndex RCSG | | LineColor "Foreground" | |---------------------------------------------------------------| | vcMinAnnoArrowFillColor NhlTColorIndex RCSG | | FillColor "Foreground" | |---------------------------------------------------------------| | vcMinAnnoArrowEdgeColor NhlTColorIndex RCSG | | EdgeColor "Background" | |---------------------------------------------------------------| | vcMinAnnoArrowUseVecColor NhlTBoolean RCSG | | VcMinAnnoArrowUseVecColor True | |---------------------------------------------------------------| | vcMinAnnoArrowAngleF NhlTFloat RCSG | | VcMinAnnoArrowAngleF 0.0 | |---------------------------------------------------------------| | vcMinAnnoArrowSpaceF NhlTFloat RCSG | | VcMinAnnoArrowSpaceF 2.0 | |---------------------------------------------------------------| | vcMinAnnoArrowMinOffsetF NhlTFloat RCSG | | VcMinAnnoArrowMinOffsetF 0.25 | |---------------------------------------------------------------| | vcMinAnnoString1On NhlTBoolean RCSG | | VcMinAnnoString1On True | |---------------------------------------------------------------| | vcMinAnnoString1 NhlTString RCSG | | VcMinAnnoString1 <dynamic> | |---------------------------------------------------------------| | vcMinAnnoString2On NhlTBoolean RCSG | | VcMinAnnoString2On True | |---------------------------------------------------------------| | vcMinAnnoString2 NhlTString RCSG | | VcMinAnnoString2 <dynamic> | |---------------------------------------------------------------| | vcMinAnnoFormat NhlTString RCSG | | NumberFormat "*+^sg" | |---------------------------------------------------------------| | vcMinAnnoFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | vcMinAnnoTextDirection NhlTTextDirection RCSG | | TextDirection "Across" | |---------------------------------------------------------------| | vcMinAnnoFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | vcMinAnnoFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | vcMinAnnoFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | vcMinAnnoFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | vcMinAnnoFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | vcMinAnnoConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | vcMinAnnoAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | vcMinAnnoFuncCode NhlTCharacter RCSG | | TextFuncCode : | |---------------------------------------------------------------| | vcMinAnnoBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | vcMinAnnoPerimOn NhlTBoolean RCSG | | EdgesOn True | |---------------------------------------------------------------| | vcMinAnnoPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | vcMinAnnoPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | vcMinAnnoPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | vcMinAnnoZone NhlTInteger RCSG | | VcMinAnnoZone 5 | |---------------------------------------------------------------| | vcMinAnnoSide NhlTPosition RCSG | | VcMinAnnoSide "Bottom" | |---------------------------------------------------------------| | vcMinAnnoJust NhlTJustification RCSG | | VcMinAnnoJust "TopRight" | |---------------------------------------------------------------| | vcMinAnnoParallelPosF NhlTFloat RCSG | | VcMinAnnoParallelPosF 1.0 | |---------------------------------------------------------------| | vcMinAnnoOrthogonalPosF NhlTFloat RCSG | | VcMinAnnoOrthogonalPosF 0.02 | |---------------------------------------------------------------| | vcNoDataLabelOn NhlTBoolean RCSG | | AnnotationLabelsOn True | |---------------------------------------------------------------| | vcNoDataLabelString NhlTString RCSG | | VcNoDataLabelString <dynamic> | |---------------------------------------------------------------| | vcZeroFLabelOn NhlTBoolean RCSG | | AnnotationLabelsOn True | |---------------------------------------------------------------| | vcZeroFLabelString NhlTString RCSG | | VcZeroFLabelString <dynamic> | |---------------------------------------------------------------| | vcZeroFLabelFormat NhlTString RCSG | | NumberFormat "*+^sg" | |---------------------------------------------------------------| | vcZeroFLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | vcZeroFLabelTextDirection NhlTTextDirection RCSG | | TextDirection "Across" | |---------------------------------------------------------------| | vcZeroFLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | vcZeroFLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | vcZeroFLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | vcZeroFLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | vcZeroFLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | vcZeroFLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | vcZeroFLabelAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | vcZeroFLabelFuncCode NhlTCharacter RCSG | | TextFuncCode : | |---------------------------------------------------------------| | vcZeroFLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | vcZeroFLabelPerimOn NhlTBoolean RCSG | | EdgesOn True | |---------------------------------------------------------------| | vcZeroFLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | vcZeroFLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | vcZeroFLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | vcZeroFLabelZone NhlTInteger RCSG | | VcZeroFLabelZone 0 | |---------------------------------------------------------------| | vcZeroFLabelSide NhlTPosition RCSG | | VcZeroFLabelSide "Bottom" | |---------------------------------------------------------------| | vcZeroFLabelJust NhlTJustification RCSG | | VcZeroFLabelJust "CenterCenter" | |---------------------------------------------------------------| | vcZeroFLabelParallelPosF NhlTFloat RCSG | | VcZeroFLabelParallelPosF 0.0 | |---------------------------------------------------------------| | vcZeroFLabelOrthogonalPosF NhlTFloat RCSG | | VcZeroFLabelOrthogonalPosF 0.0 | |---------------------------------------------------------------| | vcMagnitudeScalingMode NhlTScalingMode RCSG | | VcMagnitudeScalingMode "ScaleFactor" | |---------------------------------------------------------------| | vcMagnitudeScaleValueF NhlTFloat RCSG | | VcMagnitudeScaleValueF 1.0 | |---------------------------------------------------------------| | vcMagnitudeScaleFactorF NhlTFloat RCSG | | VcMagnitudeScaleFactorF 1.0 | |---------------------------------------------------------------| | vcMagnitudeFormat NhlTString RCSG | | NumberFormat "*+^sg" | |---------------------------------------------------------------| | vcScalarValueScalingMode NhlTScalingMode RCSG | | VcScalarValueScalingMode "ScaleFactor" | |---------------------------------------------------------------| | vcScalarValueScaleValueF NhlTFloat RCSG | | VcScalarValueScaleValueF 1.0 | |---------------------------------------------------------------| | vcScalarValueScaleFactorF NhlTFloat RCSG | | VcScalarValueScaleFactorF 1.0 | |---------------------------------------------------------------| | vcScalarValueFormat NhlTString RCSG | | NumberFormat "*+^sg" | |---------------------------------------------------------------| | vcExplicitLabelBarLabelsOn NhlTBoolean RCSG | | VcExplicitLabelBarLabelsOn False | |---------------------------------------------------------------| | vcLabelBarEndLabelsOn NhlTBoolean RCSG | | VcLabelBarEndLabelsOn False | |---------------------------------------------------------------| | vcLabelsOn NhlTBoolean RCSG | | VcLabelsOn False | |---------------------------------------------------------------| | vcLabelsUseVectorColor NhlTBoolean RCSG | | VcLabelsUseVectorColor False | |---------------------------------------------------------------| | vcLabelFontColor NhlTColorIndex RCSG | | FontColor NhlFOREGROUND | |---------------------------------------------------------------| | vcLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | +---------------------------------------------------------------+
You can access all LogLinTransformation resources. However, note that VectorPlot intercepts LogLinTransformation resources, as follows:
LogAxis
. If
trXAxisType is set to any other value, it sets
trXLog False.
LogAxis
. If
trYAxisType is set to any other value, it sets
trYLog False.
All Transformation superclass resources are accessible. However, VectorPlot blocks access to all resources specific to the IrregularTransformation except for:
and for the following intercepted resources:NULL
and trXAxisType is set to any other
value than IrregularAxis
, VectorPlot
switches to a coordinate extent bounded by 0 and the length of the
X-Axis dimension minus one. If trXAxisType is not set, but
the LogLinTransformation resource trXLog is
set, VectorPlot sets trXAxisType to
LogAxis
if trXLog is True; if trXLog is
False, it changes trXAxisType to LinearAxis
if
it had been set to LogAxis
and leaves it unchanged
otherwise. trXAxisType can be set to LogAxis
without error only when the X-Axis coordinate extent as passed from
the VectorField is entirely positive. If this is not
the case, trXAxisType will default to LinearAxis
.
NULL
and trYAxisType is set to any other
value than IrregularAxis
, VectorPlot
switches to a coordinate extent bounded by 0 and the length of the
Y-Axis dimension minus one. If trYAxisType is not set, but
the LogLinTransformation resource trYLog is
set, VectorPlot sets trYAxisType to
LogAxis
if trYLog is True; if trYLog is
False, it changes trYAxisType to LinearAxis
if
it had been set to LogAxis
and leaves it unchanged
otherwise. trYAxisType can be set to LogAxis
without error only when the Y-Axis coordinate extent as passed from
the VectorField is entirely positive. If this is not
the case, trYAxisType will default to LinearAxis
.
Never
.
Conditional
.
Conditional
.
The VectorPlot class provides many resources that you can use to tailor the plot output to your taste. However, only one resource must be set explicitly in order to generate a meaningful vector plot. You need focus only on resources that modify the VectorPlot features important to you. All the others will default to a generally usable value. Resources that provide control over related attributes of the various VectorPlot elements have related names. As an example, all resources associated with the reference vector annotation begin with the prefix vcRefAnno.
If you want to color the vector arrows individually based on data other than the vector magnitudes, you must set the boolean resource vcUseScalarArray True and also supply the vectorplot with a ScalarField object. You do this by setting the resource vcScalarFieldData using the id of an existing scalarfield. Currently, VectorPlot requires that the scalarfield have the same number of elements along each dimension (after subsetting and striding is performed) as does each component of the vectorfield. It also assumes that the data coordinate extents of the scalarfield match those of the vectorfield and ignores any explicitly set scalarfield coordinate extent values.
VectorPlot instantiates child objects to manage transformations between the data coordinate system and NDC space. The LogLinTransformation manages linear and logarithmic transformations, and the IrregularTransformation manages the transformation if one or both axes are irregularly spaced. By default the data coordinate extents are based on the extents of the supplied VectorField object data, but you may adjust them using resources belonging to the transformation objects.
NULL
. The coordinate extents of a linear axis may
arbitrarily intersect or encompass the data extent. If you set a
logarithmic axis, then the coordinate extent of that axis must be
entirely positive, but otherwise may intersect or extend beyond the
data extent.
NULL
, then VectorPlot uses an
IrregularTransformation object. Note that
VectorPlot treats an axis with an associated
coordinate array as irregular even if the coordinate array actually
has evenly spaced values. VectorPlot represents an
irregular axis not by stretching and compressing various regions of the plot,
but by displaying it with irregularly spaced tick marks.
In addition to a small performance penalty, there are some
restrictions associated with use of
IrregularTransformation object. Although you may
limit the coordinate extent to a subspace of the data coordinate
extent of the VectorField object data, you are not
allowed to define a coordinate range that extends outside the range of
the data coordinates of an irregular axis. Using the
IrregularTransformation resources trXAxisType or
trYAxisType,
it is possible to set an irregular axis to LinearAxis
or
even, under certain conditions, to LogAxis
, but the
results are probably not what you want. Since
VectorPlot does not intrinsically support a
linearization transformation for irregularly spaced data, it can only
switch to a linear system by replacing the data coordinates with array
index coordinates, which are, in fact, linearly spaced. To properly
transform irregularly spaced data into a linear or logarithmic
coordinate system, you must use the overlay mechanism (V4.1 Status Note 1).
In addition to the built-in transformation support, you can map a vectorplot into a variety of other coordinate spaces by adding it as an overlay to a base plot. You can overlay a vectorplot on a mapplot to transform the data into any of 10 different map projections. You can transform irregularly gridded vector data into a linear or logarithmic space by overlaying the vectorplot on a loglinplot. You can also make a vectorplot into an overlay of any other plot object, including a contourplot, an irregularplot, a streamlineplot, or an xyplot. Use the NhlAddOverlay function to perform an overlay.
VectorPlot has a boolean resource called vcMapDirection that allows you to specify whether the direction as well as the location is to be mapped into the coordinate space defined by the transformation currently in effect. When you set this resource False, the direction is rendered in an independent uniform coordinate system. The U component of the vector data will be parallel to the X Axis, and the V component will be parallel to the Y Axis with units of equal size in each direction.
Note that VectorPlot annotations are always drawn during the postdraw phase.
All these annotations (TickMark and Title partially excepted) subscribe to the locational conventions defined by the PlotManager Location Control Model.
Line-drawn vector arrows have a fixed shape that the user cannot modify. However, you can set a minimum and maximum size for the vector arrowhead using the resources vcLineArrowHeadMinSizeF and vcLineArrowHeadMaxSizeF. This allows you to ensure that the arrowheads remain recognizable for small-magnitude vectors while not becoming execessively large for high-magnitude vectors.
You can set the thickness of the polylines used to render line-drawn arrows using the resource vcLineArrowThicknessF. You may notice that as the lines are made thicker, the arrows begin to take on a rather fuzzy look. This is an unavoidable consequence of using thick lines, (at least where there is no control of the line join method), and one of the motivations for the development of filled vector arrows.
Transparent
.
Transparent
(-1).
The resource vcFillOverEdge specifies whether the edge should be drawn first with the fill on top or vice versa. Drawing the fill on top ensures that the full extent of the fill area appears, even when the vector arrow is very small. However, for this to work properly, the resource vcFillArrowEdgeThicknessF should be set to a value greater than 1.0. Otherwise the edges will appear broken and poorly formed. Since the default value of vcFillOverEdge is True, vcFillArrowEdgeThicknessF is set by default to 2.0.
There are seven resources for controlling the shape of filled vector arrows. These allow for many variations not only in the appearance of the arrows at the reference length but also in the way the appearance changes as the length of the arrow changes with vector magnitude. The figure below indicates which part of the arrow each of the following resources specifies:
Each of these resources is specified as a fraction of the value of vcRefLengthF.
The resources vcFillArrowMinFracWidthF, vcFillArrowHeadMinFracXF, and vcFillArrowHeadMinFracYF set minimum sizes for vcFillArrowWidthF, vcFillArrowHeadXF, and vcFillArrowHeadYF respectively. They are specified as fractions of the resource with which they are associated. So, for example, if you set vcFillArrowMinFracWidthF to 0.25, the width used for the minimum length arrow will be equal to 0.25 * vcFillArrowWidthF * vcRefLengthF NDC units. The widths used for intermediate-length arrows will be sized proportionally between the minimum width and the reference width. This implies that if you set vcFillArrowMinFracWidthF to 1.0, the arrow width will remain constant for all filled arrows, no matter what their length. Setting any of these ...MinFrac... resources to 0.0 causes their associated arrow dimension to vary in strict proportion to the arrow length.
See the example vc03n for an illustration of some of the stylistic variations that are possible using the fill arrow resources.
You can use the resource vcWindBarbScaleFactorF to convert vector fields represented with other units into knots in order to render wind speeds according to the usual convention. Note that this resource operates independently of the resources vcMagnitudeScaleFactorF and vcMagnitudeScaleValueF, both of which only apply to VectorPlot annotations.
The resource vcMonoWindBarbColor controls whether all wind barb glyphs appear in a single color. If set to its default value, True, you specify this color using the resource vcWindBarbColor. Otherwise, the wind barb glyphs are individually colored based on the array resources vcLevels and vcLevelColors and the scalar value associated with the vector.
vcWindBarbAngleF controls the angle of the ticks and the hypotenuse of the pennant triangles. It is measured in degrees clockwise from the vector direction. Use a negative value to represent southern hemisphere wind barbs, which, by convention, have their ticks on the opposite side of shaft from northern hemisphere wind barbs. vcWindBarbTickLengthF controls the length of the wind barb ticks and the hypotenuse of the triangles forming the pennants. vcWindBarbTickSpacingF controls the spacing between ticks along the shaft. Pennants are spaced by half this amount. The resource vcWindBarbCalmCircleSizeF sets the size of the circle used to render magnitudes less than 2.5. Set the thickness of the polyline elements of the wind barb glyphs using the resource vcWindBarbLineThicknessF.
LineArrow
or
FillArrow
, the length of each vector arrow is determined
in relation to a vector reference magnitude specified by the resource
vcRefMagnitudeF
and a vector reference length specified in NDC units by the
resource vcRefLengthF. Vectors
whose magnitude is equal to the reference magnitude are drawn at the
reference length. By default, the reference magnitude is the maximum
magnitude in the vectorfield, but it may be set to
any arbitrary value. The default reference length is determined
dynamically based on the viewport and the number of elements along
each data dimension. Note that the length of each vector arrow
increases as you increase the reference length but decreases as you
increase the reference magnitude.
If vcGlyphStyle is set to WindBarb
, things work
a bit differently: vector magnitude is now represented
by varying the number of ticks and/or pennants on the wind barb,
rather than by varying the size of the glyph as a whole.
VectorPlot draws most wind barbs using a
uniform length, determined solely by the value of the vcRefLengthF
resource. This length actually consists of the length of the wind barb
shaft plus the projection of a full wind barb tick onto the axis of
the shaft. Therefore, wind barbs with only a half tick or with no
tick are a bit shorter than the length specified by
vcRefLengthF. The vcRefMagnitudeF
resource has no effect on the length of wind barb glyphs. However, it
does still have a role to play in setting up the reference vector
annotation.
WindBarb
, the size of each vector arrow differs from the
reference length by the ratio of its magnitude to the reference
magnitude. In practice, a common result of this strictly proportional
representation is that low-magnitude vectors become too small to be
rendered with full detail, particularly on low-resolution devices. As
a result, their direction, especially, becomes difficult to
decipher. Therefore, VectorPlot provides a resource,
vcMinFracLengthF,
that allows you to specify, as a fraction of the reference length, a
minimum vector arrow length. When this resource is set to a value
greater than 0.0, the smallest magnitude vector is rendered at the
specified fraction of the reference length, and intermediate magnitude
vectors are rendered at proportionally intermediate lengths. Setting
vcMinFracLengthF to 1.0 causes all vector arrows to be drawn
at the reference length. If vcGlyphStyle is set to
WindBarb
, setting vcMinFracLengthF has no effect:
effectively it is forced to the value 1.0.
The resource vcMinMagnitudeF specifies the minimum magnitude a vector must have in order to qualify for drawing. You can use it to eliminate low-velocity vectors in order to concentrate attention on the dominant features of a vector field. However, note that vcMinMagnitudeF also has another role. When it has a non-zero value and vcMinFracLengthF is also non-zero, vcMinMagnitudeF specifies the vector magnitude that is rendered at the minimum length specified by vcMinFracLengthF.
By appropriately setting the vcLevelSelectionMode
resource, you can choose from four level selection modes to set up the
vcLevels array. The
default mode, AutomaticLevels
, is easy to use. It selects
a "nice" spacing starting from the smallest relatively round number
greater than the minimum data value, such that the number of levels is
as close as possible to, but less than, the value of the resource vcMaxLevelCount. EqualSpacedLevels
mode defines exactly vcMaxLevelCount
levels spaced evenly from the data minimum value to the data maximum
value. In ManualLevels
mode, you set the maximum and
minimum levels using the resources vcMinLevelValF
and vcMaxLevelValF
with a spacing defined by the resource vcLevelSpacingF. Finally,
Explicit
mode allows you to define the level values
yourself by setting the array resource vcLevels. The
ManualLevels
and ExplicitLevels
modes have
the advantage that they are independent of the maximum and minimum
values of the particular dataset you are plotting, and therefore can
be used to enforce consistency in the plots of a series of related
datasets. ExplicitLevels
is the only mode that allows
you to establish variably spaced levels.
Once you have established the levels, you can retrieve the number of levels actually used by getting the value of the read-only resource vcLevelCount.
The names given to these annotations are based on the way VectorPlot configures them by default. However, they are both capable of displaying arrows representing any arbitrary magnitude (using resources vcRefAnnoExplicitMagnitudeF or vcMinAnnoExplicitMagnitudeF), as well as arbitrary text. In addition, VectorPlot recognizes a set of substitution substrings that allows you to place within this text a number of key values drawn dynamically from the data, including maximum and minimum values of the magnitude, of each of the vector components, and of the associated ScalarField data, if present.
There is a boolean resource called vcUseRefAnnoRes, that when set True causes the minimum vector annotation (as well as the zero field annotation) to use the same values for many of the appearance-related resources that the reference vector annotation uses. This resource acts as a shortcut for achieving a consistent appearance.
In other respects, the reference and the minimum vector annotations function identically. The rest of this section discusses only the reference vector annotation but applies equally to the minimum vector annotation if you simply substitute the equivalent minimum vector annotation resource.
You control the size of the reference vector annotation indirectly, based on the text string length, the font height and aspect ratio, and the amount of space occupied by the arrow. Besides the size of the arrow itself, there are three resources that affect how much space the arrow will occupy. These are:
The resources that control the position of the reference vector annotation follow the locational conventions of the PlotManager Location Control Model. They include:By default, the reference vector annotation arrow takes its colors from the colors specified for the arrows in the plot. If the arrows in the plot are individually colored based on vector magnitude, the reference vector arrow will be colored according to the magnitude it represents. Otherwise, the colors used for the annotation arrow will be as specified by vcLineArrowColor for line-drawn arrows and wind barbs or vcFillArrowFillColor and vcFillArrowEdgeColor for filled arrows. On the other hand, if you set the resource vcRefAnnoArrowUseVecColor False, you can set the annotation arrow colors explicitly, using vcRefAnnoArrowLineColor for line-drawn arrows and wind barbs or vcRefAnnoArrowFillColor and vcRefAnnoArrowEdgeColor for filled arrows.
The reference vector annotation has a complete set of text attribute resources for controlling font height, aspect ratio, color and so forth. These resources apply to both of the annotation's strings.
You control the content of each of the two text strings in the reference vector annotation and whether they should appear at all using the following resources:
String 1 appears above or to the left of the arrow, and String 2 appears below or to the right of the arrow.There are a number of special substitution substrings that you can insert anywhere in either of the text strings. They will be replaced with substrings representing numerical values, as follows:
All the remaining resources for the zero field annotation have the prefix vcZeroFLabel. These include a complete set of text attribute resources, as well as resources for controlling position according to the locational conventions of the PlotManager Location Control Model.
1. The support for irregular transformations is at a transistional stage. Eventually, VectorPlot will be able to perform transformations from irregular coordinates to linear and logarithmic coordinates without using the overlay mechanism. This will eliminate the need for a switch to the index coordinate system.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?