Previous iTool User's Guide: Working with Vectors Next

Displaying Vectors

The iVector tool's primary purpose is to display vector data, though the tool is capable of much more once the data is visualized. The iVector tool can display multiple types of vectors and allows you to manipulate and edit the displays.

The first task is to display vector data. The following sections are examples of how to display various types of vector data.

Vector Fields

In a vector field, each datum is represented by a small arrow, with a length proportional to the magnitude of the flow at that location, and pointing in the direction of the flow.

The following example shows the flow produced by vectors of the form (-Y, X). To create this flow in IDL, enter the following code at the Command Line:

x = (y = FINDGEN(21) - 10)  
u = REBIN(-TRANSPOSE(y),21,21)  
v = REBIN(x,21,21)  
LOADCT,39,/SILENT & TVLCT,r,g,b,/GET  
IVECTOR, u, v, x, y, AUTO_COLOR=1, $  
   RGB_TABLE=[[r],[g],[b]], /ISOTROPIC  

 

Figure 16-1: Vector Field Showing Flow

Figure 16-1: Vector Field Showing Flow


Note
The setting AUTO_COLOR=1 sets the color of each vector according to its magnitude. The ISOTROPIC setting ensures that the X and Y coordinates have the same scaling.

Wind Barbs

Vector data represented using wind barbs shows data using small arrows barbs and flags. Barbs and flags represent wind speed in knots. A short barb represents 5 knots while each long barb represents 10 knots. Each flag represents 50 knots. Collectively, the barbs and flags indicate the magnitude on each arrow. The direction of the arrow indicates the direction of the wind flow.

The following example shows the wind barbs produced by a field of the form (-Y, X). In this example the VECTOR_STYLE keyword sets the style to wind barbs. To create these wind barbs in IDL, enter the following code at the Command Line:

x = (y = 2*FINDGEN(11) - 10)  
u = 9*REBIN(-TRANSPOSE(y),11,11)  
v = 9*REBIN(x,11,11)  
IVECTOR, u, v, x, y, VECTOR_STYLE=1  

 

Figure 16-2: Wind Barbs in iVector

Figure 16-2: Wind Barbs in iVector

  IDL Online Help (March 01, 2006)