Routines (alphabetical) > Routines: V > VEL Procedure

# VEL Procedure

The VEL procedure draws a velocity (flow) field with arrows following the field proportional in length to the field strength. Arrows are composed of a number of small segments that follow the streamlines.

This routine is written in the IDL language. Its source code can be found in the file `vel.pro` in the `lib` subdirectory of the IDL distribution.

## Examples

; Create a vector of X values:
X = DIST(20)
; Create a vector of Y values:
Y = SIN(X)*100
; Plot the vector field:
VEL, X, Y

## Syntax

VEL, U, V [, NVECS=value] [, XMAX= value{xsize/ysize}] [, LENGTH=value{longest/steps}] [, NSTEPS=value] [, TITLE=string]

## Arguments

### U

The X component at each point of the vector field. U must be a 2-D array.

### V

The Y component at each point of the vector field. V must have the same dimensions as U.

## Keywords

### LENGTH

The length of each arrow line segment expressed as a fraction of the longest vector divided by the number of steps. The default is 0.1.

### NSTEPS

The number of shoots or line segments for each arrow. The default is 10.

### NVECS

The number of vectors (arrows) to draw. If this keyword is omitted, 200 vectors are drawn.

### TITLE

A string containing the title for the plot.

### XMAX

X axis size as a fraction of Y axis size. The default is 1.0. This argument is ignored when !P.MULTI is set.

## Version History

Pre-4.0 | Introduced

## See Also

FLOW3, PLOT_FIELD Procedure, VELOVECT