IDL Reference Guide: Procedures and Functions |
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.
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]
Vectors of abscissae and ordinates defining the front to be drawn.
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.
Use this keyword to specify the color to use. The default = !P.COLOR.
Set this keyword to draw a convergence line. A convergence line can also be specified by setting the keyword FRONT_TYPE = 5.
Set this keyword if X and Y are specified in data coordinates.
Set this keyword if X and Y are specified in device coordinates.
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.
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.
Set this keyword if X and Y are specified in normalized coordinates. This is the default.
Set this keyword to draw an occluded front. An occluded front can also be specified by setting the keyword FRONT_TYPE = 3.
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.
Set this keyword to draw a stationary front. A stationary front can also be specified by setting the keyword FRONT_TYPE = 4.
Use this keyword to specify the height of front symbols, in normalized units. The default = 0.02.
Use this keyword to specify the length and spacing factor for front symbols, in normalized units. The default = 0.15.
Use this keyword to specify the line thickness. The default = 1.0.
Set this keyword to draw a warm front. A warm front can also be specified by setting the keyword FRONT_TYPE = 2.
This example draws various fronts on a map of the United States.
Note that this example code is in wf_draw.pro
in the lib
subdirectory of the IDL installation directory, and can be run by entering test_wf_draw
at the IDL command line.
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
IDL Online Help (March 06, 2007)