The WF_DRAW procedure draws weather fronts of various types using parametric spline interpolation to smooth the lines. WF_DRAW uses the POLYFILL routine to make the annotations on the front lines.

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

Examples


This example draws various fronts on a map of the United States. To draw the map, first define the test_wf_draw procedure by pasting the following code into a file named test_wf_draw.pro and saving the file in a directory in IDL’s path. (If you are using the IDL Workbench, you can compile the procedure by clicking on the code.)

PRO test_wf_draw
 MAP_SET, LIMIT = [25, -125, 50, -70], /GRID, /USA
 WF_DRAW, [ -120, -110, -100], [30, 50, 45], /COLD, /DATA, THICK=2
 WF_DRAW, [ -80, -80, -75], [ 50, 40, 35], /WARM, /DATA, THICK=2
 WF_DRAW, [ -80, -80, -75]-10., [ 50, 40, 35], /OCCLUDED, /DATA,$
    THICK=2
 WF_DRAW, [ -120, -105], [ 40,35], /STATION, /DATA, THICK=2
 WF_DRAW, [ -100, -90, -90], [ 30,35,40], /CONVERG, /DATA, THICK=2
 names=['None','Cold','Warm','Occluded','Stationary','Convergent']
 x = [.015, .30]
 y = 0.04
 dy = 0.05
 ty = N_ELEMENTS(names) * dy + y
 POLYFILL, x[[0,1,1,0]],[0, 0, ty, ty],/NORM, COLOR=!P.BACKGROUND
 FOR i=0, N_ELEMENTS(names)-1 DO BEGIN
    WF_DRAW, x, y, /NORM, FRONT_TYPE=i, THICK=2
    XYOUTS, x[1]+0.015, y[0], names[i], /NORM, CHARS=1.5
    y = y + dy
 ENDFOR
END

Next, execute the procedure:

test_wf_draw

Syntax


WF_DRAW, X, Y [[, /COLD | , FRONT_TYPE=1] | [, /WARM | , FRONT_TYPE=2] | [, /OCCLUDED | , FRONT_TYPE=3] | [, /STATIONARY | , FRONT_TYPE=4] | [, /CONVERGENCE | , FRONT_TYPE=5]] [, COLOR=value] [, /DATA | , /DEVICE | , /NORMAL] [, INTERVAL=value] [, PSYM=value] [, SYM_HT=value] [, SYM_LEN=value] [, THICK=value]

Arguments


X, Y

Vectors of abscissae and ordinates defining the front to be drawn.

Keywords


COLD

Set this keyword to draw a cold front. The default is a plain line with no annotations. A cold front can also be specified by setting the keyword FRONT_TYPE = 1.

COLOR

Use this keyword to specify the color to use. The default = !P.COLOR.

CONVERGENCE

Set this keyword to draw a convergence line. A convergence line can also be specified by setting the keyword FRONT_TYPE = 5.

DATA

Set this keyword if X and Y are specified in data coordinates.

DEVICE

Set this keyword if X and Y are specified in device coordinates.

FRONT_TYPE

Set this keyword equal to the numeric index of type of front to draw. Front type indices are as follows: COLD=1, WARM=2, OCCLUDED=3, STATIONARY=4, CONVERGENCE = 5. Not required if plain line is desired or if an explicit front type keyword is specified.

INTERVAL

Use this keyword to specify the spline interpolation interval, in normalized units. The default = 0.01. Larger values give coarser approximations to curves, smaller values make more interpolated points.

NORMAL

Set this keyword if X and Y are specified in normalized coordinates. This is the default.

OCCLUDED

Set this keyword to draw an occluded front. An occluded front can also be specified by setting the keyword FRONT_TYPE = 3.

PSYM

Set this keyword a standard PSYM value to draw a marker on each actual (X, Y) data point. See PSYM for a list of the symbol types.

STATIONARY

Set this keyword to draw a stationary front. A stationary front can also be specified by setting the keyword FRONT_TYPE = 4.

SYM_HT

Use this keyword to specify the height of front symbols, in normalized units. The default = 0.02.

SYM_LEN

Use this keyword to specify the length and spacing factor for front symbols, in normalized units. The default = 0.15.

THICK

Use this keyword to specify the line thickness. The default = 1.0.

WARM

Set this keyword to draw a warm front. A warm front can also be specified by setting the keyword FRONT_TYPE = 2.

Version History


Pre-4.0

Introduced

See Also


ANNOTATE Procedure, XYOUTS Procedure