NCL Home>
Application examples>
gsn_csm graphical interfaces ||
Data files for some examples
Example pages containing:
tips |
resources |
functions/procedures
Vectors (high-level graphical interfaces)
Vector Plot Templates
gsn_vector
gsn_csm_vector
gsn_csm_vector_scalar_map_ce
gsn_csm_vector_map_ce
gsn_csm_vector_map_polar
gsn_csm_vector_scalar_map_polar
gsn_csm_pres_hgt_vector
There is a change in NCL version 4.2.0.a27 that affects label bars on
plots with reference vectors! If you have an old script in which you
moved the reference vector up and adjusted the label bar using pmLabelBarOrthogonalPosF, the label bar
may now be lower than you expect. If so try removing the resource.
Additional Examples:
vector_1.ncl: Creates a vector plot
over SST contours.
gsnScalarContour = True,
means that a scalar contour plot will also be drawn. The default is
False, which colors the vectors by the scalar map (see example 4).
vcRefMagnitudeF = 5.0, Defines the
reference vector magnitude. Use this to adjust the size of the
vectors.
vcRefLengthF = 0.045, Defines the
length of the reference vector
gsn_csm_vector_scalar_map_ce is the
plot interface that draws a vector plot over a scalar contour plot.
cnLinesOn = False, Turns of the
contour lines.
cnLineLabelsOn = False, Turns off
the contour line labels.
vcGlyphStyle = "CurlyVector",
Turns on the curly vectors (available since NCL version 4.2.0.a019).
vector_3.ncl: Draw vectors on a
global map with a time stamp at the bottom.
gsn_csm_vector_map_ce is the plot interface that draws
vectors over a map.
vcMinDistanceF = 0.017, Thins the
vectors
vcRefAnnoOrthogonalPosF = -1.0,
Moves the reference vector up.
infoTimeStamp is a
utility for creating a time stamp at the bottom of the figure. The
arguments are the workstation, the size of the text, and the right
string. The left string is automatically generated and includes the
time and date of the plots creation.
vector_6.ncl: Draws vectors with
with automatic default clipping, and then with clipping turned off.
To turn off vector clipping, set the resource vpClipOn to False. This resources
was added in version a034.
vector_7.ncl: This example shows
how to position the vector arrows differently using the
resource
vcPositionMode. The
default is "ArrowCenter". You can also use "ArrowHead" or
"ArrowTail".
Polymarkers are added to each plot
using gsn_add_polymarker
so you
can see locations of the vector coordinates.