The ARROW procedure draws one or more vectors with arrow heads.
This routine is written in the IDL language. Its source code can be found in the file arrow.pro in the lib subdirectory of the IDL distribution.
Examples
Draw an arrow from (100,150) to (300,350) in DEVICE units:
ARROW, 100, 150, 300, 350
Draw a sine wave with arrows from the line Y = 0 to SIN(X/4):
X = FINDGEN(50)
Y = SIN(x/4)
PLOT, X, Y
ARROW, X, REPLICATE(0,50), X, Y, /DATA
Syntax
ARROW, X0, Y0, X1, Y1 [, /DATA | , /NORMALIZED] [, HSIZE=length] [, COLOR=index] [, HTHICK=value] [, /SOLID] [, THICK=value]
Arguments
X0, Y0
Arrays or scalars containing the coordinates of the tail end of the vector or vectors. Coordinates are in DEVICE coordinates unless otherwise specified.
X1,Y1
Arrays or scalars containing the coordinates of the arrowhead end of the vector or vectors. X1 and Y1 must have the save number of elements as X0 and Y0.
Keywords
DATA
Set this keyword if vector coordinates are DATA coordinates.
NORMALIZED
Set this keyword if vector coordinates are NORMALIZED coordinates.
HSIZE
Use this keyword to set the length of the lines used to draw the arrowhead. The default is 1/64th the width of the display (!D.X_SIZE / 64.). If the HSIZE is positive, the value is assumed to be in device coordinate units. If HSIZE is negative, the arrowhead length is set to the vector length * ABS(HSIZE). The lines are separated by 60 degrees to make the arrowhead.
COLOR
The color of the arrow. The default is the highest color index.
HTHICK
The thickness of the arrowheads. The default is 1.0.
SOLID
Set this keyword to make a solid arrow, using polygon fills, looks better for thick arrows.
THICK
The thickness of the body. The default is 1.0.
Version History
See Also
ANNOTATE Procedure, PLOTS Procedure, VELOVECT Procedure