.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: proc vector</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc vector</h2></td>
  <td align=right>
  <small>
  <a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  Version 2.40 Jan'08
     </small><br><a href="../doc/scripthome.html">Scripts</a>
  <td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>

.TH proc_vector PL "15-JAN-2008   PL ploticus.sourceforge.net"

.ig >>
<center>
<img src="../gallery/vector0.gif">
</center>
.>>

.LP
\fBproc vector\fR displays a group of vectors, using the
.ig >>
<a href="dataformat.html#currentds">
.>>
\0current data set,
.ig >>
</a>
.>>
in the
.ig >>
<a href="areadef.html">
.>>
\0current plot area.
.ig >>
</a>
.>>
\fBproc vector\fR can render arrows, plain lines, 

.ig >>
<a href="../gallery/vecbars.htm">
.>>
\0error bars (I bars), T bars,
.ig >>
</a>
.>>

or 
.ig >>
<a href="../gallery/windbarbs.htm">
.>>
\0wind barbs.
.ig >>
</a>
.>>

Vector direction can be specified in degrees, radians, or by directly supplying the coordinates
of the second point.
Vector length or magnitude can be constant for all vectors, or controlled by your data.
See also the
.ig >>
<a href="../gallery/gall.vector.html">
.>>
\0vector gallery examples.
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>
.SH Attributes
\fCxfield\fR and
\fCyfield\fR \fBmust\fR be supplied.
Vector direction and magnitude must be specified, either by a) supplying
\fCdirfield\fR along with \fCmagfield\fR or \fCconstantlen\fR; or
b) supplying \fCx2field\fR and \fCy2field\fR.

.ig >>
<br><br>
.>>
.LP
\fBtype\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCarrow | barb | errorbar | tbar \fR
.IP \0
Controls the type of vector to draw.  Default is \fCarrow\fR

.ig >>
<br><br>
.>>

.LP
\fBxfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.br
\fByfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
Data fields holding the X coordinate and Y coordinate of the vector starting point.


.ig >>
<br><br>
.>>
.LP
\fBdirfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
Data field holding a representation of the direction.
By default this is degrees, where 0 is at the top, and rotating clockwise,
but other options are available, see \fCdirunits\fR, \fCdirrange\fR, \fCzeroat\fR, and \fCclockdir\fR.

.ig >>
<br><br>
.>>
.LP
\fBconstantlen\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fIh\fR
.IP \0
This attribute may be specified to cause all vectors to be \fIh\fR inches/cm.
.br
Example: \fCconstantlen: 0.6\fR

.ig >>
<br><br>
.>>
.LP
\fBx2field\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.br
\fBy2field\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
Data fields holding the X coordinate and Y coordinate of the vector ending point.
This is an alternative way of specifying the direction and length of the vector, so
if these are specified, then \fCdirfield\fR and \fCmagfield\fR are not needed.

.ig >>
<br><br><br>
.>>
.SH Data-driven vector length
.LP
\fBmagfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.br
\fBlenfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
Data field holding a representation of the magnitude or length of the vector.
By default this is in absolute units (inches or cm),
but other options are available, see \fClenunits\fR and \fClenscale\fR.
\fBlenfield\fR is an alias to \fBmagfield\fR.

.ig >>
<br><br>
.>>

.LP
\fBlenunits\fC  
.ig >>
&nbsp; &nbsp;
.>>
absolute | data | x | y
.IP \0
Allows the contents of \fClenfield\fR to be either \fCabsolute\fR units (the default),
or \fCdata\fR units.

.ig >>
<br><br>
.>>
.LP
\fBlenscale\fI 
.ig >>
&nbsp; &nbsp;
.>>
h\fR
.IP \0
\fIh\fR is a scaling factor;  the contents of \fClenfield\fR will be
multiplied by \fIh\fR.  Default is \fC1.0\fR.

.ig >>
<br><br><br>
.>>

.SH Data-driven vector color 
.LP
\fBcolorfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
If specified, the color (and any other 
.ig >>
<a href="linedetails.html">
.>>
\0linedetails
.ig >>
</a>
.>>
)
for the vector will be controlled using 
the contents of this data field, using the
.ig >>
<a href="legendentry.html#legenddriven">
.>>
\0legend-driven technique
.ig >>
</a>
.>>
(the legend serves as a table to map data values to colors, etc).
.br
Example:
.ig >>
<a href="../gallery/vector3.htm">
.>>
\0vector3
.ig >>
</a>
.>>

.ig >>
<br><br>
.>>
.LP
\fBexactcolorfield\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="attributetypes.html#dfield">
.>>
\0dfield
.ig >>
</a>
.>>
.IP \0
If specified, the color (and any other 
.ig >>
<a href="linedetails.html">
.>>
\0linedetails
.ig >>
</a>
.>>
) for the vector will be controlled using 
the contents of this data field directly.
For example, to control vector color, this data field could hold values like this:
.nf
  color=green
  color=blue
  color=grey(0.9)
.fi

.ig >>
<br><br><br>
.>>
.SH Vector appearance details

.LP
\fBlinedetails\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="linedetails.html">
.>>
\0line details
.ig >>
</a>
.>>
.IP \0
Controls the color, width, etc. of the line portion of the vector.

.ig >>
<br><br>
.>>
.LP
\fBarrowheadlength\fI 
.ig >>
&nbsp; &nbsp;
.>>
h \fR
.IP \0
Controls the length of the arrowhead, in inches/cm.  Default is \fC0.15\fR.

.ig >>
<br><br>
.>>
.LP
\fBarrowheadwidth\fI 
.ig >>
&nbsp; &nbsp;
.>>
h \fR
.IP \0
Controls the fatness of the arrowhead.  Default is \fC0.4\fR.

.ig >>
<br><br>
.>>
.LP
\fBarrowheadcolor\fI 
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="color.html">
.>>
\0color
.ig >>
</a>
.>>
.IP \0
Controls the color of the arrowhead.  By default this will be the
same as the line.

.ig >>
<br><br>
.>>
.LP
\fBtaillen\fI
.ig >>
&nbsp; &nbsp;
.>>
\fIh\fR
.IP \0
Controls the length of tails when error bars or t bars are being rendered.  
\fIh\fR is in absolute units (inches or cm).

.ig >>
<br><br>
.>>
.LP
\fBclip\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCyes | no\fR
.IP \0
Default is \fCyes\fR, which causes vectors to be clipped to the plotting area.
Use \fCno\fR to allow vectors to range past the plot area limits.

.ig >>
<br><br><br>
.>>
.SH Vector direction details

.LP
\fBdirrange\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fIh\fR
.IP \0
A range for the values in \fCdirfield\fR.  For example, if \fCdirrange\fR is given
as \fC100\fR, a value of \fC50\fR would be displayed at 180 degrees.
.br
Example: \fCdirrange: 12\fR

.ig >>
<br><br>
.>>
.LP
\fBdirunits\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCdegrees | radians\fR
.IP \0
Default is \fCdegrees\fR.  If \fCradians\fR is specified, 
\fCdirfield\fR is taken to be radians.
.br
Example: \fCdirunits: radians\fR

.ig >>
<br><br>
.>>
.LP
\fBzeroat\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fCtop | right | bottom | right\fR
.IP \0
Controls where a zero degree vector will point.  Default is \fCtop\fR.

.ig >>
<br><br>
.>>
.LP
\fBclockdir\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fC+ | -\fR
.IP \0
Controls whether progressively higher directional values will
cause the vector to move clockwise (\fC+\fR) or counterclockwise (\fC-\fR).
Default is \fC+\fR.



.ig >>
<br><br><br>
.>>
.SH Selecting data rows
.LP
\fBselect\fR
.ig >>
&nbsp; &nbsp;
.>>
.ig >>
<a href="select.html">
.>>
\0select expression
.ig >>
</a>
.>>
.IP \0
Select certain records for plotting, based on a conditional expression.
.br
Example: \fCselect: @@4 = B\fR

.ig >>
<br><br><br>
.>>
.SH Legend
.LP
\fBlegendlabel\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fIlabel\fR
.IP \0
Set a legend label for this set of vectors.  Legend must be displayed
later using proc legend.  The legend entry will identify the vector by showing a line segment only
(no arrowhead).
The \fC\\n\fR construct can be used to force a line break when the legend is displayed,
or the label can be wordwrapped using proc legend wraplen attribute (2.32+).

.ig >>
<br><br><br>
.>>
.SH Drawing wind barbs

Set \fCtype\fR to \fCbarb\fR.
For best results, use \fCconstantlen\fR to set the size of the barb's stem.
The original wind barbs code was contributed by Andrew Phillips.

.ig >>
<br><br>
.>>

.LP
\fBbarblimits\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fI big medium small tiny \fR
.IP \0
Sets the limits for drawing different sized barbs on the stem of a wind
barb.  The default for the big triangular barb is 50,  the medium sized
(full length, 1 line) barb is 10, small sized barb (half length) is 5,
tiny barbs are just the stem drawn half length is 2.  The tiny barbs are
not the official way to show very low wind, which normally is to draw a
dot instead, which can be done using a scatterplot and a few selects.
.br
Example: \fCbarblimits: 40 12 8 2\fR

.ig >>
<br><br>
.>>

.LP
\fBbarbdir\fR 
.ig >>
&nbsp; &nbsp;
.>>
\fId\fR
.IP \0
The angle the barbs are drawn relative to the stem, in degrees.  Default is 120.



.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif"> 
</center>
</td></tr>
</table>
<br>
<center>
Ploticus is hosted at http://ploticus.sourceforge.net <br>
<img src="http://sourceforge.net/sflogo.php?group_id=38453" width="88" height="31" border="0" alt="SourceForge Logo">
</center>
.>>

